Mercurial > emacs
annotate lisp/textmodes/reftex-sel.el @ 76174:fec5e03aaf59
Remove FSF copyright since file does not differ significantly from X11
version.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Tue, 27 Feb 2007 03:04:22 +0000 |
parents | e3694f1cb928 |
children | 690423f53b08 95d0cdf160ea |
rev | line source |
---|---|
38422
7a94f1c588c4
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
37998
diff
changeset
|
1 ;;; reftex-sel.el --- the selection modes for RefTeX |
74508
0b524ec529e1
Fix time-travelling copyright years.
Glenn Morris <rgm@gnu.org>
parents:
69177
diff
changeset
|
2 |
0b524ec529e1
Fix time-travelling copyright years.
Glenn Morris <rgm@gnu.org>
parents:
69177
diff
changeset
|
3 ;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, |
75347 | 4 ;; 2006, 2007 Free Software Foundation, Inc. |
27035 | 5 |
46612
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
43352
diff
changeset
|
6 ;; Author: Carsten Dominik <dominik@science.uva.nl> |
69094
bfd5c5e60410
Version number change only
Carsten Dominik <dominik@science.uva.nl>
parents:
68648
diff
changeset
|
7 ;; Version: 4.31 |
27035 | 8 |
9 ;; This file is part of GNU Emacs. | |
10 | |
11 ;; GNU Emacs is free software; you can redistribute it and/or modify | |
12 ;; it under the terms of the GNU General Public License as published by | |
13 ;; the Free Software Foundation; either version 2, or (at your option) | |
14 ;; any later version. | |
15 | |
16 ;; GNU Emacs is distributed in the hope that it will be useful, | |
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 ;; GNU General Public License for more details. | |
20 | |
21 ;; You should have received a copy of the GNU General Public License | |
22 ;; along with GNU Emacs; see the file COPYING. If not, write to the | |
65638
e274642bf5d5
Update FSF street address; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
65548
diff
changeset
|
23 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
e274642bf5d5
Update FSF street address; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
65548
diff
changeset
|
24 ;; Boston, MA 02110-1301, USA. |
25280 | 25 |
38422
7a94f1c588c4
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
37998
diff
changeset
|
26 ;;; Commentary: |
7a94f1c588c4
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
37998
diff
changeset
|
27 |
7a94f1c588c4
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
37998
diff
changeset
|
28 ;;; Code: |
7a94f1c588c4
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
37998
diff
changeset
|
29 |
26910
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25806
diff
changeset
|
30 (eval-when-compile (require 'cl)) |
25280 | 31 (provide 'reftex-sel) |
32 (require 'reftex) | |
33 ;;; | |
34 | |
35 (defvar reftex-select-label-map nil | |
36 "Keymap used for *RefTeX Select* buffer, when selecting a label. | |
37 This keymap can be used to configure the label selection process which is | |
38 started with the command \\[reftex-reference].") | |
39 | |
40 (defun reftex-select-label-mode () | |
41 "Major mode for selecting a label in a LaTeX document. | |
42 This buffer was created with RefTeX. | |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
43 It only has a meaningful keymap when you are in the middle of a |
25280 | 44 selection process. |
45 To select a label, move the cursor to it and press RET. | |
46 Press `?' for a summary of important key bindings. | |
47 | |
48 During a selection process, these are the local bindings. | |
49 | |
50 \\{reftex-select-label-map}" | |
51 | |
52 (interactive) | |
53 (kill-all-local-variables) | |
46683
060f433ebf11
Updated to RefTeX 4.18
Carsten Dominik <dominik@science.uva.nl>
parents:
46612
diff
changeset
|
54 (when (featurep 'xemacs) |
060f433ebf11
Updated to RefTeX 4.18
Carsten Dominik <dominik@science.uva.nl>
parents:
46612
diff
changeset
|
55 ;; XEmacs needs the call to make-local-hook |
060f433ebf11
Updated to RefTeX 4.18
Carsten Dominik <dominik@science.uva.nl>
parents:
46612
diff
changeset
|
56 (make-local-hook 'pre-command-hook) |
060f433ebf11
Updated to RefTeX 4.18
Carsten Dominik <dominik@science.uva.nl>
parents:
46612
diff
changeset
|
57 (make-local-hook 'post-command-hook)) |
25280 | 58 (setq major-mode 'reftex-select-label-mode |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
59 mode-name "LSelect") |
25280 | 60 (set (make-local-variable 'reftex-select-marked) nil) |
61 (when (syntax-table-p reftex-latex-syntax-table) | |
62 (set-syntax-table reftex-latex-syntax-table)) | |
63 ;; We do not set a local map - reftex-select-item does this. | |
65548
253cad16882d
Little fixes to remove compiler warnings
Carsten Dominik <dominik@science.uva.nl>
parents:
64751
diff
changeset
|
64 (run-hooks 'reftex-select-label-mode-hook)) |
25280 | 65 |
66 (defvar reftex-select-bib-map nil | |
67 "Keymap used for *RefTeX Select* buffer, when selecting a BibTeX entry. | |
68 This keymap can be used to configure the BibTeX selection process which is | |
69 started with the command \\[reftex-citation].") | |
70 | |
71 (defun reftex-select-bib-mode () | |
72 "Major mode for selecting a citation key in a LaTeX document. | |
73 This buffer was created with RefTeX. | |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
74 It only has a meaningful keymap when you are in the middle of a |
25280 | 75 selection process. |
76 In order to select a citation, move the cursor to it and press RET. | |
77 Press `?' for a summary of important key bindings. | |
78 | |
79 During a selection process, these are the local bindings. | |
80 | |
81 \\{reftex-select-label-map}" | |
82 (interactive) | |
83 (kill-all-local-variables) | |
46683
060f433ebf11
Updated to RefTeX 4.18
Carsten Dominik <dominik@science.uva.nl>
parents:
46612
diff
changeset
|
84 (when (featurep 'xemacs) |
060f433ebf11
Updated to RefTeX 4.18
Carsten Dominik <dominik@science.uva.nl>
parents:
46612
diff
changeset
|
85 ;; XEmacs needs the call to make-local-hook |
060f433ebf11
Updated to RefTeX 4.18
Carsten Dominik <dominik@science.uva.nl>
parents:
46612
diff
changeset
|
86 (make-local-hook 'pre-command-hook) |
060f433ebf11
Updated to RefTeX 4.18
Carsten Dominik <dominik@science.uva.nl>
parents:
46612
diff
changeset
|
87 (make-local-hook 'post-command-hook)) |
25280 | 88 (setq major-mode 'reftex-select-bib-mode |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
89 mode-name "BSelect") |
25280 | 90 (set (make-local-variable 'reftex-select-marked) nil) |
91 ;; We do not set a local map - reftex-select-item does this. | |
65548
253cad16882d
Little fixes to remove compiler warnings
Carsten Dominik <dominik@science.uva.nl>
parents:
64751
diff
changeset
|
92 (run-hooks 'reftex-select-bib-mode-hook)) |
25280 | 93 |
47050
904fd28be439
Update to RefTeX 4.19
Carsten Dominik <dominik@science.uva.nl>
parents:
46683
diff
changeset
|
94 ;;; (defun reftex-get-offset (buf here-am-I &optional typekey toc index file) |
904fd28be439
Update to RefTeX 4.19
Carsten Dominik <dominik@science.uva.nl>
parents:
46683
diff
changeset
|
95 ;;; ;; Find the correct offset data, like insert-docstruct would, but faster. |
904fd28be439
Update to RefTeX 4.19
Carsten Dominik <dominik@science.uva.nl>
parents:
46683
diff
changeset
|
96 ;;; ;; Buffer BUF knows the correct docstruct to use. |
904fd28be439
Update to RefTeX 4.19
Carsten Dominik <dominik@science.uva.nl>
parents:
46683
diff
changeset
|
97 ;;; ;; Basically this finds the first docstruct entry after HERE-I-AM which |
904fd28be439
Update to RefTeX 4.19
Carsten Dominik <dominik@science.uva.nl>
parents:
46683
diff
changeset
|
98 ;;; ;; is of allowed type. The optional arguments specify what is allowed. |
904fd28be439
Update to RefTeX 4.19
Carsten Dominik <dominik@science.uva.nl>
parents:
46683
diff
changeset
|
99 ;;; (catch 'exit |
904fd28be439
Update to RefTeX 4.19
Carsten Dominik <dominik@science.uva.nl>
parents:
46683
diff
changeset
|
100 ;;; (save-excursion |
904fd28be439
Update to RefTeX 4.19
Carsten Dominik <dominik@science.uva.nl>
parents:
46683
diff
changeset
|
101 ;;; (set-buffer buf) |
904fd28be439
Update to RefTeX 4.19
Carsten Dominik <dominik@science.uva.nl>
parents:
46683
diff
changeset
|
102 ;;; (reftex-access-scan-info) |
904fd28be439
Update to RefTeX 4.19
Carsten Dominik <dominik@science.uva.nl>
parents:
46683
diff
changeset
|
103 ;;; (let* ((rest (memq here-am-I (symbol-value reftex-docstruct-symbol))) |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
104 ;;; entry) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
105 ;;; (while (setq entry (pop rest)) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
106 ;;; (if (or (and typekey |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
107 ;;; (stringp (car entry)) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
108 ;;; (or (equal typekey " ") |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
109 ;;; (equal typekey (nth 1 entry)))) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
110 ;;; (and toc (eq (car entry) 'toc)) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
111 ;;; (and index (eq (car entry) 'index)) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
112 ;;; (and file |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
113 ;;; (memq (car entry) '(bof eof file-error)))) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
114 ;;; (throw 'exit entry))) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
115 ;;; nil)))) |
47050
904fd28be439
Update to RefTeX 4.19
Carsten Dominik <dominik@science.uva.nl>
parents:
46683
diff
changeset
|
116 |
25280 | 117 (defun reftex-get-offset (buf here-am-I &optional typekey toc index file) |
118 ;; Find the correct offset data, like insert-docstruct would, but faster. | |
119 ;; Buffer BUF knows the correct docstruct to use. | |
47050
904fd28be439
Update to RefTeX 4.19
Carsten Dominik <dominik@science.uva.nl>
parents:
46683
diff
changeset
|
120 ;; Basically this finds the first docstruct entry before HERE-I-AM which |
25280 | 121 ;; is of allowed type. The optional arguments specify what is allowed. |
122 (catch 'exit | |
123 (save-excursion | |
124 (set-buffer buf) | |
125 (reftex-access-scan-info) | |
47050
904fd28be439
Update to RefTeX 4.19
Carsten Dominik <dominik@science.uva.nl>
parents:
46683
diff
changeset
|
126 (let* ((rest (symbol-value reftex-docstruct-symbol)) |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
127 lastentry entry) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
128 (while (setq entry (pop rest)) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
129 (if (or (and typekey |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
130 (stringp (car entry)) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
131 (or (equal typekey " ") |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
132 (equal typekey (nth 1 entry)))) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
133 (and toc (eq (car entry) 'toc)) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
134 (and index (eq (car entry) 'index)) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
135 (and file |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
136 (memq (car entry) '(bof eof file-error)))) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
137 (setq lastentry entry)) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
138 (if (eq entry here-am-I) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
139 (throw 'exit (or lastentry entry)))) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
140 nil)))) |
25280 | 141 |
142 (defun reftex-insert-docstruct | |
143 (buf toc labels index-entries files context counter show-commented | |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
144 here-I-am xr-prefix toc-buffer) |
25280 | 145 ;; Insert an excerpt of the docstruct list. |
146 ;; Return the data property of the entry corresponding to HERE-I-AM. | |
147 ;; BUF is the buffer which has the correct docstruct-symbol. | |
148 ;; LABELS non-nil means to include labels into the list. | |
149 ;; When a string, indicates the label type to include | |
34402
5eec8d1d09f0
Update to RefTeX 4.15, see ChangeLog for details
Carsten Dominik <dominik@science.uva.nl>
parents:
29775
diff
changeset
|
150 ;; FILES non-nil means to display file boundaries. |
25280 | 151 ;; CONTEXT non-nil means to include label context. |
152 ;; COUNTER means to count the labels. | |
153 ;; SHOW-COMMENTED means to include also labels which are commented out. | |
154 ;; HERE-I-AM is a member of the docstruct list. The function will return | |
155 ;; a used member near to this one, as a possible starting point. | |
156 ;; XR-PREFIX is the prefix to put in front of labels. | |
157 ;; TOC-BUFFER means this is to fill the toc buffer. | |
158 (let* ((font (reftex-use-fonts)) | |
159 (cnt 0) | |
160 (index -1) | |
161 (toc-indent " ") | |
162 (label-indent | |
163 (concat "> " | |
164 (if toc (make-string (* 7 reftex-level-indent) ?\ ) ""))) | |
165 (context-indent | |
166 (concat ". " | |
167 (if toc (make-string (* 7 reftex-level-indent) ?\ ) ""))) | |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
168 (mouse-face |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
169 (if (memq reftex-highlight-selection '(mouse both)) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
170 reftex-mouse-selected-face |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
171 nil)) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
172 (label-face (reftex-verified-face reftex-label-face |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
173 'font-lock-constant-face |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
174 'font-lock-reference-face)) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
175 (index-face (reftex-verified-face reftex-index-face |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
176 'font-lock-constant-face |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
177 'font-lock-reference-face)) |
25280 | 178 all cell text label typekey note comment master-dir-re |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
179 prev-inserted offset from to index-tag docstruct-symbol) |
25280 | 180 |
181 ;; Pop to buffer buf to get the correct buffer-local variables | |
182 (save-excursion | |
183 (set-buffer buf) | |
184 | |
185 ;; Ensure access to scanning info | |
186 (reftex-access-scan-info) | |
187 | |
188 (setq docstruct-symbol reftex-docstruct-symbol | |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
189 all (symbol-value reftex-docstruct-symbol) |
25280 | 190 reftex-active-toc nil |
191 master-dir-re | |
192 (concat "\\`" (regexp-quote | |
193 (file-name-directory (reftex-TeX-master-file)))))) | |
194 | |
195 (set (make-local-variable 'reftex-docstruct-symbol) docstruct-symbol) | |
196 (set (make-local-variable 'reftex-prefix) | |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
197 (cdr (assoc labels reftex-typekey-to-prefix-alist))) |
25280 | 198 (if (equal reftex-prefix " ") (setq reftex-prefix nil)) |
199 | |
200 ;; Walk the docstruct and insert the appropriate stuff | |
201 (while (setq cell (pop all)) | |
202 | |
203 (incf index) | |
204 (setq from (point)) | |
205 | |
206 (cond | |
207 | |
208 ((memq (car cell) '(bib thebib label-numbers appendix | |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
209 master-dir bibview-cache is-multi xr xr-doc))) |
25280 | 210 ;; These are currently ignored |
211 | |
212 ((memq (car cell) '(bof eof file-error)) | |
213 ;; Beginning or end of a file | |
214 (when files | |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
215 (setq prev-inserted cell) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
216 ; (if (eq offset 'attention) (setq offset cell)) |
25280 | 217 (insert |
218 " File " (if (string-match master-dir-re (nth 1 cell)) | |
219 (substring (nth 1 cell) (match-end 0)) | |
220 (nth 1 cell)) | |
221 (cond ((eq (car cell) 'bof) " starts here\n") | |
222 ((eq (car cell) 'eof) " ends here\n") | |
223 ((eq (car cell) 'file-error) " was not found\n"))) | |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
224 (setq to (point)) |
25280 | 225 (when font |
226 (put-text-property from to | |
227 'face reftex-file-boundary-face)) | |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
228 (when toc-buffer |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
229 (if mouse-face |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
230 (put-text-property from (1- to) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
231 'mouse-face mouse-face)) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
232 (put-text-property from to :data cell)))) |
25280 | 233 |
234 ((eq (car cell) 'toc) | |
235 ;; a table of contents entry | |
26910
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25806
diff
changeset
|
236 (when (and toc |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
237 (<= (nth 5 cell) reftex-toc-max-level)) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
238 (setq prev-inserted cell) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
239 ; (if (eq offset 'attention) (setq offset cell)) |
25280 | 240 (setq reftex-active-toc cell) |
241 (insert (concat toc-indent (nth 2 cell) "\n")) | |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
242 (setq to (point)) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
243 (when font |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
244 (put-text-property from to |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
245 'face reftex-section-heading-face)) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
246 (when toc-buffer |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
247 (if mouse-face |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
248 (put-text-property from (1- to) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
249 'mouse-face mouse-face)) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
250 (put-text-property from to :data cell)) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
251 (goto-char to))) |
25280 | 252 |
253 ((stringp (car cell)) | |
254 ;; a label | |
255 (when (null (nth 2 cell)) | |
256 ;; No context yet. Quick update. | |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
257 (setcdr cell (cdr (reftex-label-info-update cell))) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
258 (put docstruct-symbol 'modified t)) |
25280 | 259 |
260 (setq label (car cell) | |
261 typekey (nth 1 cell) | |
262 text (nth 2 cell) | |
263 comment (nth 4 cell) | |
264 note (nth 5 cell)) | |
265 | |
266 (when (and labels | |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
267 (or (eq labels t) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
268 (string= typekey labels) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
269 (string= labels " ")) |
25280 | 270 (or show-commented (null comment))) |
271 | |
272 ;; Yes we want this one | |
273 (incf cnt) | |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
274 (setq prev-inserted cell) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
275 ; (if (eq offset 'attention) (setq offset cell)) |
25280 | 276 |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
277 (setq label (concat xr-prefix label)) |
25280 | 278 (when comment (setq label (concat "% " label))) |
279 (insert label-indent label) | |
280 (when font | |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
281 (setq to (point)) |
25280 | 282 (put-text-property |
283 (- (point) (length label)) to | |
284 'face (if comment | |
285 'font-lock-comment-face | |
286 label-face)) | |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
287 (goto-char to)) |
25280 | 288 |
289 (insert (if counter (format " (%d) " cnt) "") | |
290 (if comment " LABEL IS COMMENTED OUT " "") | |
291 (if (stringp note) (concat " " note) "") | |
292 "\n") | |
293 (setq to (point)) | |
294 | |
295 (when context | |
296 (insert context-indent text "\n") | |
297 (setq to (point))) | |
298 (put-text-property from to :data cell) | |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
299 (when mouse-face |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
300 (put-text-property from (1- to) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
301 'mouse-face mouse-face)) |
25280 | 302 (goto-char to))) |
303 | |
304 ((eq (car cell) 'index) | |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
305 ;; index entry |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
306 (when (and index-entries |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
307 (or (eq t index-entries) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
308 (string= index-entries (nth 1 cell)))) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
309 (setq prev-inserted cell) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
310 ; (if (eq offset 'attention) (setq offset cell)) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
311 (setq index-tag (format "<%s>" (nth 1 cell))) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
312 (and font |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
313 (put-text-property 0 (length index-tag) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
314 'face reftex-index-tag-face index-tag)) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
315 (insert label-indent index-tag " " (nth 7 cell)) |
25280 | 316 |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
317 (when font |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
318 (setq to (point)) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
319 (put-text-property |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
320 (- (point) (length (nth 7 cell))) to |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
321 'face index-face) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
322 (goto-char to)) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
323 (insert "\n") |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
324 (setq to (point)) |
25280 | 325 |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
326 (when context |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
327 (insert context-indent (nth 2 cell) "\n") |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
328 (setq to (point))) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
329 (put-text-property from to :data cell) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
330 (when mouse-face |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
331 (put-text-property from (1- to) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
332 'mouse-face mouse-face)) |
47050
904fd28be439
Update to RefTeX 4.19
Carsten Dominik <dominik@science.uva.nl>
parents:
46683
diff
changeset
|
333 (goto-char to)))) |
904fd28be439
Update to RefTeX 4.19
Carsten Dominik <dominik@science.uva.nl>
parents:
46683
diff
changeset
|
334 |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
335 (if (eq cell here-I-am) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
336 (setq offset 'attention)) |
47050
904fd28be439
Update to RefTeX 4.19
Carsten Dominik <dominik@science.uva.nl>
parents:
46683
diff
changeset
|
337 (if (and prev-inserted (eq offset 'attention)) |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
338 (setq offset prev-inserted)) |
47050
904fd28be439
Update to RefTeX 4.19
Carsten Dominik <dominik@science.uva.nl>
parents:
46683
diff
changeset
|
339 ) |
25280 | 340 |
341 (when (reftex-refontify) | |
342 ;; we need to fontify the buffer | |
343 (reftex-fontify-select-label-buffer buf)) | |
344 (run-hooks 'reftex-display-copied-context-hook) | |
345 offset)) | |
346 | |
347 (defun reftex-find-start-point (fallback &rest locations) | |
348 ;; Set point to the first available LOCATION. When a LOCATION is a list, | |
349 ;; search for such a :data text property. When it is an integer, | |
350 ;; use is as line number. FALLBACK is a buffer position used if everything | |
351 ;; else fails. | |
352 (catch 'exit | |
353 (goto-char (point-min)) | |
354 (let (loc pos) | |
355 (while locations | |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
356 (setq loc (pop locations)) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
357 (cond |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
358 ((null loc)) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
359 ((listp loc) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
360 (setq pos (text-property-any (point-min) (point-max) :data loc)) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
361 (when pos |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
362 (goto-char pos) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
363 (throw 'exit t))) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
364 ((integerp loc) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
365 (when (<= loc (count-lines (point-min) (point-max))) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
366 (goto-line loc) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
367 (throw 'exit t))))) |
25280 | 368 (goto-char fallback)))) |
369 | |
370 (defvar reftex-last-data nil) | |
371 (defvar reftex-last-line nil) | |
372 (defvar reftex-select-marked nil) | |
373 | |
374 (defun reftex-select-item (prompt help-string keymap | |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
375 &optional offset |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
376 call-back cb-flag) |
25280 | 377 ;; Select an item, using PROMPT. The function returns a key indicating |
378 ;; an exit status, along with a data structure indicating which item was | |
379 ;; selected. | |
380 ;; HELP-STRING contains help. KEYMAP is a keymap with the available | |
381 ;; selection commands. | |
382 ;; OFFSET can be a label list item which will be selected at start. | |
383 ;; When it is t, point will start out at the beginning of the buffer. | |
384 ;; Any other value will cause restart where last selection left off. | |
385 ;; When CALL-BACK is given, it is a function which is called with the index | |
386 ;; of the element. | |
387 ;; CB-FLAG is the initial value of that flag. | |
388 | |
389 (let* (ev data last-data (selection-buffer (current-buffer))) | |
390 | |
391 (setq reftex-select-marked nil) | |
392 | |
393 (setq ev | |
394 (catch 'myexit | |
395 (save-window-excursion | |
396 (setq truncate-lines t) | |
397 | |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
398 ;; Find a good starting point |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
399 (reftex-find-start-point |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
400 (point-min) offset reftex-last-data reftex-last-line) |
25280 | 401 (beginning-of-line 1) |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
402 (set (make-local-variable 'reftex-last-follow-point) (point)) |
25280 | 403 |
404 (unwind-protect | |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
405 (progn |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
406 (use-local-map keymap) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
407 (add-hook 'pre-command-hook 'reftex-select-pre-command-hook nil t) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
408 (add-hook 'post-command-hook 'reftex-select-post-command-hook nil t) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
409 (princ prompt) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
410 (set-marker reftex-recursive-edit-marker (point)) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
411 ;; XEmacs does not run post-command-hook here |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
412 (and (featurep 'xemacs) (run-hooks 'post-command-hook)) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
413 (recursive-edit)) |
25280 | 414 |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
415 (set-marker reftex-recursive-edit-marker nil) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
416 (save-excursion |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
417 (set-buffer selection-buffer) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
418 (use-local-map nil) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
419 (remove-hook 'pre-command-hook 'reftex-select-pre-command-hook t) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
420 (remove-hook 'post-command-hook |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
421 'reftex-select-post-command-hook t)) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
422 ;; Kill the mark overlays |
62467
35f6599373fc
* textmodes/reftex-vars.el (reftex-cite-format-builtin): Support
Carsten Dominik <dominik@science.uva.nl>
parents:
59534
diff
changeset
|
423 (mapcar (lambda (c) (reftex-delete-overlay (nth 1 c))) |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
424 reftex-select-marked))))) |
25280 | 425 |
426 (set (make-local-variable 'reftex-last-line) | |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
427 (+ (count-lines (point-min) (point)) (if (bolp) 1 0))) |
25280 | 428 (set (make-local-variable 'reftex-last-data) last-data) |
429 (reftex-kill-buffer "*RefTeX Help*") | |
430 (setq reftex-callback-fwd (not reftex-callback-fwd)) ;; ;-))) | |
431 (message "") | |
432 (list ev data last-data))) | |
433 | |
434 ;; The following variables are all bound dynamically in `reftex-select-item'. | |
435 ;; The defvars are here only to silence the byte compiler. | |
436 | |
437 (defvar found-list) | |
438 (defvar cb-flag) | |
439 (defvar data) | |
440 (defvar prompt) | |
441 (defvar last-data) | |
442 (defvar call-back) | |
443 (defvar help-string) | |
444 (defvar refstyle) | |
445 | |
446 ;; The selection commands | |
447 | |
448 (defun reftex-select-pre-command-hook () | |
449 (reftex-unhighlight 1) | |
450 (reftex-unhighlight 0)) | |
451 | |
452 (defun reftex-select-post-command-hook () | |
453 (let (b e) | |
454 (setq data (get-text-property (point) :data)) | |
455 (setq last-data (or data last-data)) | |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
456 |
25280 | 457 (when (and data cb-flag |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
458 (not (equal reftex-last-follow-point (point)))) |
25280 | 459 (setq reftex-last-follow-point (point)) |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
460 (funcall call-back data reftex-callback-fwd |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
461 (not reftex-revisit-to-follow))) |
25280 | 462 (if data |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
463 (setq b (or (previous-single-property-change |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
464 (1+ (point)) :data) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
465 (point-min)) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
466 e (or (next-single-property-change |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
467 (point) :data) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
468 (point-max))) |
25280 | 469 (setq b (point) e (point))) |
470 (and (memq reftex-highlight-selection '(cursor both)) | |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
471 (reftex-highlight 1 b e)) |
25280 | 472 (if (or (not (pos-visible-in-window-p b)) |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
473 (not (pos-visible-in-window-p e))) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
474 (recenter '(4))) |
25280 | 475 (unless (current-message) |
476 (princ prompt)))) | |
477 | |
478 (defun reftex-select-next (&optional arg) | |
479 "Move to next selectable item." | |
480 (interactive "p") | |
481 (setq reftex-callback-fwd t) | |
482 (or (eobp) (forward-char 1)) | |
483 (re-search-forward "^[^. \t\n\r]" nil t arg) | |
484 (beginning-of-line 1)) | |
485 (defun reftex-select-previous (&optional arg) | |
486 "Move to previous selectable item." | |
487 (interactive "p") | |
488 (setq reftex-callback-fwd nil) | |
489 (re-search-backward "^[^. \t\n\r]" nil t arg)) | |
37998
706af946b1e7
* reftex-ref.el (reftex-select-label-help): Added "z" key
Carsten Dominik <dominik@science.uva.nl>
parents:
34402
diff
changeset
|
490 (defun reftex-select-jump (arg) |
706af946b1e7
* reftex-ref.el (reftex-select-label-help): Added "z" key
Carsten Dominik <dominik@science.uva.nl>
parents:
34402
diff
changeset
|
491 "Jump to a specific section. E.g. '3 z' jumps to section 3. |
706af946b1e7
* reftex-ref.el (reftex-select-label-help): Added "z" key
Carsten Dominik <dominik@science.uva.nl>
parents:
34402
diff
changeset
|
492 Useful for large TOC's." |
706af946b1e7
* reftex-ref.el (reftex-select-label-help): Added "z" key
Carsten Dominik <dominik@science.uva.nl>
parents:
34402
diff
changeset
|
493 (interactive "P") |
706af946b1e7
* reftex-ref.el (reftex-select-label-help): Added "z" key
Carsten Dominik <dominik@science.uva.nl>
parents:
34402
diff
changeset
|
494 (goto-char (point-min)) |
706af946b1e7
* reftex-ref.el (reftex-select-label-help): Added "z" key
Carsten Dominik <dominik@science.uva.nl>
parents:
34402
diff
changeset
|
495 (re-search-forward |
706af946b1e7
* reftex-ref.el (reftex-select-label-help): Added "z" key
Carsten Dominik <dominik@science.uva.nl>
parents:
34402
diff
changeset
|
496 (concat "^ *" (number-to-string (if (numberp arg) arg 1)) " ") |
706af946b1e7
* reftex-ref.el (reftex-select-label-help): Added "z" key
Carsten Dominik <dominik@science.uva.nl>
parents:
34402
diff
changeset
|
497 nil t) |
706af946b1e7
* reftex-ref.el (reftex-select-label-help): Added "z" key
Carsten Dominik <dominik@science.uva.nl>
parents:
34402
diff
changeset
|
498 (beginning-of-line)) |
25280 | 499 (defun reftex-select-next-heading (&optional arg) |
500 "Move to next table of contentes line." | |
501 (interactive "p") | |
502 (end-of-line) | |
503 (re-search-forward "^ " nil t arg) | |
504 (beginning-of-line)) | |
505 (defun reftex-select-previous-heading (&optional arg) | |
506 "Move to previous table of contentes line." | |
507 (interactive "p") | |
508 (re-search-backward "^ " nil t arg)) | |
509 (defun reftex-select-quit () | |
510 "Abort selection process." | |
511 (interactive) | |
512 (throw 'myexit nil)) | |
513 (defun reftex-select-keyboard-quit () | |
514 "Abort selection process." | |
515 (interactive) | |
516 (throw 'exit t)) | |
517 (defun reftex-select-jump-to-previous () | |
518 "Jump back to where previous selection process left off." | |
519 (interactive) | |
520 (let (pos) | |
521 (cond | |
522 ((and (local-variable-p 'reftex-last-data (current-buffer)) | |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
523 reftex-last-data |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
524 (setq pos (text-property-any (point-min) (point-max) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
525 :data reftex-last-data))) |
25280 | 526 (goto-char pos)) |
527 ((and (local-variable-p 'reftex-last-line (current-buffer)) | |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
528 (integerp reftex-last-line)) |
25280 | 529 (goto-line reftex-last-line)) |
530 (t (ding))))) | |
531 (defun reftex-select-toggle-follow () | |
532 "Toggle follow mode: Other window follows with full context." | |
533 (interactive) | |
534 (setq reftex-last-follow-point -1) | |
535 (setq cb-flag (not cb-flag))) | |
536 (defun reftex-select-toggle-varioref () | |
537 "Toggle the macro used for referencing the label between \\ref and \\vref." | |
538 (interactive) | |
539 (if (string= refstyle "\\ref") | |
540 (setq refstyle "\\vref") | |
541 (setq refstyle "\\ref")) | |
542 (force-mode-line-update)) | |
543 (defun reftex-select-toggle-fancyref () | |
544 "Toggle the macro used for referencing the label between \\ref and \\vref." | |
545 (interactive) | |
546 (setq refstyle | |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
547 (cond ((string= refstyle "\\ref") "\\fref") |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
548 ((string= refstyle "\\fref") "\\Fref") |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
549 (t "\\ref"))) |
25280 | 550 (force-mode-line-update)) |
551 (defun reftex-select-show-insertion-point () | |
552 "Show the point from where selection was started in another window." | |
553 (interactive) | |
554 (let ((this-window (selected-window))) | |
555 (unwind-protect | |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
556 (progn |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
557 (switch-to-buffer-other-window |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
558 (marker-buffer reftex-select-return-marker)) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
559 (goto-char (marker-position reftex-select-return-marker)) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
560 (recenter '(4))) |
25280 | 561 (select-window this-window)))) |
562 (defun reftex-select-callback () | |
563 "Show full context in another window." | |
564 (interactive) | |
565 (if data (funcall call-back data reftex-callback-fwd nil) (ding))) | |
566 (defun reftex-select-accept () | |
567 "Accept the currently selected item." | |
568 (interactive) | |
569 (throw 'myexit 'return)) | |
570 (defun reftex-select-mouse-accept (ev) | |
571 "Accept the item at the mouse click." | |
572 (interactive "e") | |
573 (mouse-set-point ev) | |
574 (setq data (get-text-property (point) :data)) | |
575 (setq last-data (or data last-data)) | |
576 (throw 'myexit 'return)) | |
577 (defun reftex-select-read-label () | |
578 "Use minibuffer to read a label to reference, with completion." | |
579 (interactive) | |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
580 (let ((label (completing-read |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
581 "Label: " (symbol-value reftex-docstruct-symbol) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
582 nil nil reftex-prefix))) |
25280 | 583 (unless (or (equal label "") (equal label reftex-prefix)) |
584 (throw 'myexit label)))) | |
585 (defun reftex-select-read-cite () | |
586 "Use minibuffer to read a citation key with completion." | |
587 (interactive) | |
588 (let* ((key (completing-read "Citation key: " found-list)) | |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
589 (entry (assoc key found-list))) |
25280 | 590 (cond |
591 ((or (null key) (equal key ""))) | |
592 (entry | |
593 (setq data entry) | |
594 (setq last-data data) | |
595 (throw 'myexit 'return)) | |
596 (t (throw 'myexit key))))) | |
597 | |
598 (defun reftex-select-mark (&optional separator) | |
599 "Mark the entry." | |
600 (interactive) | |
601 (let* ((data (get-text-property (point) :data)) | |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
602 boe eoe ovl) |
25280 | 603 (or data (error "No entry to mark at point")) |
604 (if (assq data reftex-select-marked) | |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
605 (error "Entry is already marked")) |
25280 | 606 (setq boe (or (previous-single-property-change (1+ (point)) :data) |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
607 (point-min)) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
608 eoe (or (next-single-property-change (point) :data) (point-max))) |
62467
35f6599373fc
* textmodes/reftex-vars.el (reftex-cite-format-builtin): Support
Carsten Dominik <dominik@science.uva.nl>
parents:
59534
diff
changeset
|
609 (setq ovl (reftex-make-overlay boe eoe)) |
25280 | 610 (push (list data ovl separator) reftex-select-marked) |
62467
35f6599373fc
* textmodes/reftex-vars.el (reftex-cite-format-builtin): Support
Carsten Dominik <dominik@science.uva.nl>
parents:
59534
diff
changeset
|
611 (reftex-overlay-put ovl 'face reftex-select-mark-face) |
35f6599373fc
* textmodes/reftex-vars.el (reftex-cite-format-builtin): Support
Carsten Dominik <dominik@science.uva.nl>
parents:
59534
diff
changeset
|
612 (reftex-overlay-put ovl 'before-string |
35f6599373fc
* textmodes/reftex-vars.el (reftex-cite-format-builtin): Support
Carsten Dominik <dominik@science.uva.nl>
parents:
59534
diff
changeset
|
613 (if separator |
35f6599373fc
* textmodes/reftex-vars.el (reftex-cite-format-builtin): Support
Carsten Dominik <dominik@science.uva.nl>
parents:
59534
diff
changeset
|
614 (format "*%c%d* " separator |
35f6599373fc
* textmodes/reftex-vars.el (reftex-cite-format-builtin): Support
Carsten Dominik <dominik@science.uva.nl>
parents:
59534
diff
changeset
|
615 (length reftex-select-marked)) |
35f6599373fc
* textmodes/reftex-vars.el (reftex-cite-format-builtin): Support
Carsten Dominik <dominik@science.uva.nl>
parents:
59534
diff
changeset
|
616 (format "*%d* " (length reftex-select-marked)))) |
25280 | 617 (message "Entry has mark no. %d" (length reftex-select-marked)))) |
618 | |
619 (defun reftex-select-mark-comma () | |
620 "Mark the entry and store the `comma' separator." | |
621 (interactive) | |
622 (reftex-select-mark ?,)) | |
623 (defun reftex-select-mark-to () | |
624 "Mark the entry and store the `to' separator." | |
625 (interactive) | |
626 (reftex-select-mark ?-)) | |
627 (defun reftex-select-mark-and () | |
628 "Mark the entry and store `and' to separator." | |
629 (interactive) | |
630 (reftex-select-mark ?+)) | |
631 | |
632 (defun reftex-select-unmark () | |
633 "Unmark the entry." | |
634 (interactive) | |
635 (let* ((data (get-text-property (point) :data)) | |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
636 (cell (assq data reftex-select-marked)) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
637 (ovl (nth 1 cell)) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
638 (cnt 0) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
639 sep) |
25280 | 640 (unless cell |
641 (error "No marked entry at point")) | |
62467
35f6599373fc
* textmodes/reftex-vars.el (reftex-cite-format-builtin): Support
Carsten Dominik <dominik@science.uva.nl>
parents:
59534
diff
changeset
|
642 (and ovl (reftex-delete-overlay ovl)) |
25280 | 643 (setq reftex-select-marked (delq cell reftex-select-marked)) |
62467
35f6599373fc
* textmodes/reftex-vars.el (reftex-cite-format-builtin): Support
Carsten Dominik <dominik@science.uva.nl>
parents:
59534
diff
changeset
|
644 (setq cnt (1+ (length reftex-select-marked))) |
35f6599373fc
* textmodes/reftex-vars.el (reftex-cite-format-builtin): Support
Carsten Dominik <dominik@science.uva.nl>
parents:
59534
diff
changeset
|
645 (mapcar (lambda (c) |
35f6599373fc
* textmodes/reftex-vars.el (reftex-cite-format-builtin): Support
Carsten Dominik <dominik@science.uva.nl>
parents:
59534
diff
changeset
|
646 (setq sep (nth 2 c)) |
35f6599373fc
* textmodes/reftex-vars.el (reftex-cite-format-builtin): Support
Carsten Dominik <dominik@science.uva.nl>
parents:
59534
diff
changeset
|
647 (reftex-overlay-put (nth 1 c) 'before-string |
35f6599373fc
* textmodes/reftex-vars.el (reftex-cite-format-builtin): Support
Carsten Dominik <dominik@science.uva.nl>
parents:
59534
diff
changeset
|
648 (if sep |
35f6599373fc
* textmodes/reftex-vars.el (reftex-cite-format-builtin): Support
Carsten Dominik <dominik@science.uva.nl>
parents:
59534
diff
changeset
|
649 (format "*%c%d* " sep (decf cnt)) |
35f6599373fc
* textmodes/reftex-vars.el (reftex-cite-format-builtin): Support
Carsten Dominik <dominik@science.uva.nl>
parents:
59534
diff
changeset
|
650 (format "*%d* " (decf cnt))))) |
35f6599373fc
* textmodes/reftex-vars.el (reftex-cite-format-builtin): Support
Carsten Dominik <dominik@science.uva.nl>
parents:
59534
diff
changeset
|
651 reftex-select-marked) |
25280 | 652 (message "Entry no longer marked"))) |
653 | |
654 (defun reftex-select-help () | |
655 "Display a summary of the special key bindings." | |
656 (interactive) | |
657 (with-output-to-temp-buffer "*RefTeX Help*" | |
658 (princ help-string)) | |
659 (reftex-enlarge-to-fit "*RefTeX Help*" t)) | |
660 | |
661 ;; Common bindings in reftex-select-label-map and reftex-select-bib-map | |
662 (let ((map (make-sparse-keymap))) | |
663 (substitute-key-definition | |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
664 'next-line 'reftex-select-next map global-map) |
25280 | 665 (substitute-key-definition |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
666 'previous-line 'reftex-select-previous map global-map) |
25280 | 667 (substitute-key-definition |
668 'keyboard-quit 'reftex-select-keyboard-quit map global-map) | |
669 (substitute-key-definition | |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
670 'newline 'reftex-select-accept map global-map) |
25280 | 671 |
672 (loop for x in | |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
673 '((" " . reftex-select-callback) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
674 ("n" . reftex-select-next) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
675 ([(down)] . reftex-select-next) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
676 ("p" . reftex-select-previous) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
677 ([(up)] . reftex-select-previous) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
678 ("f" . reftex-select-toggle-follow) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
679 ("\C-m" . reftex-select-accept) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
680 ([(return)] . reftex-select-accept) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
681 ("q" . reftex-select-quit) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
682 ("." . reftex-select-show-insertion-point) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
683 ("?" . reftex-select-help)) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
684 do (define-key map (car x) (cdr x))) |
25280 | 685 |
686 ;; The mouse-2 binding | |
687 (if (featurep 'xemacs) | |
688 (define-key map [(button2)] 'reftex-select-mouse-accept) | |
69177
a4c2155cc832
(reftex-select-label-map,
Carsten Dominik <dominik@science.uva.nl>
parents:
69094
diff
changeset
|
689 (define-key map [(mouse-2)] 'reftex-select-mouse-accept) |
a4c2155cc832
(reftex-select-label-map,
Carsten Dominik <dominik@science.uva.nl>
parents:
69094
diff
changeset
|
690 (define-key map [follow-link] 'mouse-face)) |
a4c2155cc832
(reftex-select-label-map,
Carsten Dominik <dominik@science.uva.nl>
parents:
69094
diff
changeset
|
691 |
25280 | 692 |
693 ;; Digit arguments | |
694 (loop for key across "0123456789" do | |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
695 (define-key map (vector (list key)) 'digit-argument)) |
25280 | 696 (define-key map "-" 'negative-argument) |
697 | |
698 ;; Make two maps | |
699 (setq reftex-select-label-map map) | |
700 (setq reftex-select-bib-map (copy-keymap map))) | |
701 | |
702 ;; Specific bindings in reftex-select-label-map | |
703 (loop for key across "aAcgFlrRstx#%" do | |
704 (define-key reftex-select-label-map (vector (list key)) | |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
705 (list 'lambda '() |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
706 "Press `?' during selection to find out about this key." |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
707 '(interactive) (list 'throw '(quote myexit) key)))) |
25280 | 708 |
709 (loop for x in | |
710 '(("b" . reftex-select-jump-to-previous) | |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
711 ("z" . reftex-select-jump) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
712 ("v" . reftex-select-toggle-varioref) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
713 ("V" . reftex-select-toggle-fancyref) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
714 ("m" . reftex-select-mark) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
715 ("u" . reftex-select-unmark) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
716 ("," . reftex-select-mark-comma) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
717 ("-" . reftex-select-mark-to) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
718 ("+" . reftex-select-mark-and) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
719 ([(tab)] . reftex-select-read-label) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
720 ("\C-i" . reftex-select-read-label) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
721 ("\C-c\C-n" . reftex-select-next-heading) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
722 ("\C-c\C-p" . reftex-select-previous-heading)) |
25280 | 723 do |
724 (define-key reftex-select-label-map (car x) (cdr x))) | |
725 | |
726 ;; Specific bindings in reftex-select-bib-map | |
59534
9bad65481674
2005-01-14 Carsten Dominik <dominik@science.uva.nl>
Carsten Dominik <dominik@science.uva.nl>
parents:
52401
diff
changeset
|
727 (loop for key across "grRaAeE" do |
25280 | 728 (define-key reftex-select-bib-map (vector (list key)) |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
729 (list 'lambda '() |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
730 "Press `?' during selection to find out about this key." |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
731 '(interactive) (list 'throw '(quote myexit) key)))) |
25280 | 732 |
733 (loop for x in | |
734 '(("\C-i" . reftex-select-read-cite) | |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
735 ([(tab)] . reftex-select-read-cite) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
736 ("m" . reftex-select-mark) |
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
737 ("u" . reftex-select-unmark)) |
25280 | 738 do (define-key reftex-select-bib-map (car x) (cdr x))) |
52170
27340819ef07
Updated to version 4.21
Carsten Dominik <dominik@science.uva.nl>
parents:
49599
diff
changeset
|
739 |
25280 | 740 |
52401 | 741 ;;; arch-tag: 842078ff-0586-4e0b-957e-536e08218464 |
25280 | 742 ;;; reftex-sel.el ends here |