aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Nicolaescu2007-10-31 06:28:09 +0000
committerDan Nicolaescu2007-10-31 06:28:09 +0000
commit91dd4dc44291d513b64ee95736c0b1dbd519bd82 (patch)
tree254c41df95ab1b66ba0c8aefdf275e5b50869355
parent2c3a09b1ac5070ffe0371c7ca9ea1bcf4f462237 (diff)
downloademacs-91dd4dc44291d513b64ee95736c0b1dbd519bd82.tar.gz
emacs-91dd4dc44291d513b64ee95736c0b1dbd519bd82.zip
* progmodes/mixal-mode.el (mixal-run, mixal-debug): Call mixvm
only if it is bound. * textmodes/reftex.el: Move autoloads for before all uses. (reftex-make-overlay, reftex-overlay-put, reftex-move-overlay) (reftex-delete-overlay): Move to the top level with the condition in the body. * progmodes/simula.el: Use when instead of if. * iimage.el (iimage-locate-file): Define unconditionally. * mail/mailabbrev.el (mail-abbrev-next-line): * emulation/vip.el (vip-enlarge-region, vip-line) (vip-next-line-at-bol, vip-previous-line) (vip-previous-line-at-bol, vip-find-char, vip-put-back, ex-read): Wrap with-no-warnings around uses of next-line and previous-line. * ediff.el (run-ediff-from-cvs-buffer): * ediff-vers.el (cvs-run-ediff-on-file-descriptor): Remove function not used by pcl-cvs anymore. (noninteractive, generic-sc-get-latest-rev) (ediff-generic-sc-internal, ediff-generic-sc-merge-internal): Delete support for long obsolete generic-sc.el.
-rw-r--r--lisp/ChangeLog27
-rw-r--r--lisp/ediff-vers.el103
-rw-r--r--lisp/ediff.el14
-rw-r--r--lisp/emulation/vip.el16
-rw-r--r--lisp/iimage.el6
-rw-r--r--lisp/mail/mailabbrev.el2
-rw-r--r--lisp/progmodes/mixal-mode.el12
-rw-r--r--lisp/progmodes/simula.el8
-rw-r--r--lisp/textmodes/reftex.el344
9 files changed, 220 insertions, 312 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 32d4ad8ae6a..ff36e73b6ad 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,30 @@
12007-10-31 Dan Nicolaescu <dann@ics.uci.edu>
2
3 * progmodes/mixal-mode.el (mixal-run, mixal-debug): Call mixvm
4 only if it is bound.
5
6 * textmodes/reftex.el: Move autoloads for before all uses.
7 (reftex-make-overlay, reftex-overlay-put, reftex-move-overlay)
8 (reftex-delete-overlay): Move to the top level with the condition
9 in the body.
10
11 * progmodes/simula.el: Use when instead of if.
12
13 * iimage.el (iimage-locate-file): Define unconditionally.
14
15 * mail/mailabbrev.el (mail-abbrev-next-line):
16 * emulation/vip.el (vip-enlarge-region, vip-line)
17 (vip-next-line-at-bol, vip-previous-line)
18 (vip-previous-line-at-bol, vip-find-char, vip-put-back, ex-read):
19 Wrap with-no-warnings around uses of next-line and previous-line.
20
21 * ediff.el (run-ediff-from-cvs-buffer):
22 * ediff-vers.el (cvs-run-ediff-on-file-descriptor): Remove
23 function not used by pcl-cvs anymore.
24 (noninteractive, generic-sc-get-latest-rev)
25 (ediff-generic-sc-internal, ediff-generic-sc-merge-internal):
26 Delete support for long obsolete generic-sc.el.
27
12007-10-31 Glenn Morris <rgm@gnu.org> 282007-10-31 Glenn Morris <rgm@gnu.org>
2 29
3 * cvs-status.el: No longer require pcvs when compiling. 30 * cvs-status.el: No longer require pcvs when compiling.
diff --git a/lisp/ediff-vers.el b/lisp/ediff-vers.el
index 8480984b95c..98c1defc212 100644
--- a/lisp/ediff-vers.el
+++ b/lisp/ediff-vers.el
@@ -39,13 +39,6 @@
39 (let ((load-path (cons (expand-file-name ".") load-path))) 39 (let ((load-path (cons (expand-file-name ".") load-path)))
40 (load "pcl-cvs" 'noerror) 40 (load "pcl-cvs" 'noerror)
41 (load "rcs" 'noerror) 41 (load "rcs" 'noerror)
42 ;; On 8+3 MS-DOS filesystems, generic-x.el is loaded
43 ;; instead of (the missing) generic-sc.el. Since the
44 ;; version of Emacs which supports MS-DOS doesn't have
45 ;; generic-sc, we simply avoid loading it.
46 (or (and (fboundp 'msdos-long-file-names)
47 (not (msdos-long-file-names)))
48 (load "generic-sc" 'noerror))
49 ;; (load "vc" 'noerror) ; this sometimes causes compiler error 42 ;; (load "vc" 'noerror) ; this sometimes causes compiler error
50 (or (featurep 'ediff-init) 43 (or (featurep 'ediff-init)
51 (load "ediff-init.el" nil nil 'nosuffix)) 44 (load "ediff-init.el" nil nil 'nosuffix))
@@ -157,32 +150,6 @@ comparison or merge operations are being performed."
157 (ediff-buffers rev1buf rev2buf startup-hooks 'ediff-revision) 150 (ediff-buffers rev1buf rev2buf startup-hooks 'ediff-revision)
158 )) 151 ))
159 152
160
161;; GENERIC-SC.el support
162
163(defun generic-sc-get-latest-rev ()
164 (cond ((eq sc-mode 'CCASE)
165 (eval "main/LATEST"))
166 (t (eval ""))))
167
168(defun ediff-generic-sc-internal (rev1 rev2 &optional startup-hooks)
169;; Run Ediff on versions of the current buffer.
170;; If REV2 is "" then compare current buffer with REV1.
171;; If the current buffer is named `F', the version is named `F.~REV~'.
172;; If `F.~REV~' already exists, it is used instead of being re-created.
173 (let (rev1buf rev2buf)
174 (save-excursion
175 (if (or (not rev1) (string= rev1 ""))
176 (setq rev1 (generic-sc-get-latest-rev)))
177 (sc-visit-previous-revision rev1)
178 (setq rev1buf (current-buffer)))
179 (save-excursion
180 (or (string= rev2 "") ; use current buffer
181 (sc-visit-previous-revision rev2))
182 (setq rev2buf (current-buffer)))
183 (ediff-buffers rev1buf rev2buf startup-hooks 'ediff-revision)))
184
185
186;;; Merge with Version Control 153;;; Merge with Version Control
187 154
188(defun ediff-vc-merge-internal (rev1 rev2 ancestor-rev 155(defun ediff-vc-merge-internal (rev1 rev2 ancestor-rev
@@ -245,76 +212,6 @@ comparison or merge operations are being performed."
245 (ediff-merge-buffers 212 (ediff-merge-buffers
246 buf1 buf2 startup-hooks 'ediff-merge-revisions merge-buffer-file)))) 213 buf1 buf2 startup-hooks 'ediff-merge-revisions merge-buffer-file))))
247 214
248(defun ediff-generic-sc-merge-internal (rev1 rev2 ancestor-rev
249 &optional
250 startup-hooks merge-buffer-file)
251 ;; If ANCESTOR-REV non-nil, merge with ancestor
252 (let (buf1 buf2 ancestor-buf)
253 (save-excursion
254 (if (string= rev1 "")
255 (setq rev1 (generic-sc-get-latest-rev)))
256 (sc-visit-previous-revision rev1)
257 (setq buf1 (current-buffer)))
258 (save-excursion
259 (or (string= rev2 "")
260 (sc-visit-previous-revision rev2))
261 (setq buf2 (current-buffer)))
262 (if ancestor-rev
263 (save-excursion
264 (or (string= ancestor-rev "")
265 (sc-visit-previous-revision ancestor-rev))
266 (setq ancestor-buf (current-buffer))))
267 (if ancestor-rev
268 (ediff-merge-buffers-with-ancestor
269 buf1 buf2 ancestor-buf
270 startup-hooks 'ediff-merge-revisions-with-ancestor merge-buffer-file)
271 (ediff-merge-buffers
272 buf1 buf2 startup-hooks 'ediff-merge-revisions merge-buffer-file))))
273
274
275;; PCL-CVS.el support
276
277;; MK: Check. This function doesn't seem to be used any more by pcvs or pcl-cvs
278(defun cvs-run-ediff-on-file-descriptor (tin)
279;; This is a replacement for cvs-emerge-mode
280;; Runs after cvs-update.
281;; Ediff-merge appropriate revisions of the selected file.
282 (let* ((fileinfo (tin-cookie cvs-cookie-handle tin))
283 (type (cvs-fileinfo->type fileinfo))
284 (tmp-file
285 (cvs-retrieve-revision-to-tmpfile fileinfo))
286 (default-directory
287 (file-name-as-directory (cvs-fileinfo->dir fileinfo)))
288 ancestor-file)
289
290 (or (memq type '(MERGED CONFLICT MODIFIED))
291 (error
292 "Can only merge `Modified', `Merged' or `Conflict' files"))
293
294 (cond ((memq type '(MERGED CONFLICT))
295 (setq ancestor-file
296 (cvs-retrieve-revision-to-tmpfile
297 fileinfo
298 ;; revision
299 (cvs-fileinfo->base-revision fileinfo)))
300 (ediff-merge-buffers-with-ancestor
301 (find-file-noselect tmp-file)
302 (find-file-noselect (cvs-fileinfo->backup-file fileinfo))
303 (find-file-noselect ancestor-file)
304 nil ; startup-hooks
305 'ediff-merge-revisions-with-ancestor))
306 ((eq type 'MODIFIED)
307 (ediff-buffers
308 (find-file-noselect tmp-file)
309 (if (featurep 'xemacs)
310 ;; XEmacs doesn't seem to have cvs-fileinfo->full-name
311 (find-file-noselect (cvs-fileinfo->full-path fileinfo))
312 (find-file-noselect (cvs-fileinfo->full-name fileinfo)))
313 nil ; startup-hooks
314 'ediff-revisions)))
315 (if (stringp tmp-file) (ediff-delete-version-file tmp-file))
316 (if (stringp ancestor-file) (ediff-delete-version-file ancestor-file))))
317
318 215
319;; delete version file on exit unless ediff-keep-tmp-versions is true 216;; delete version file on exit unless ediff-keep-tmp-versions is true
320(defun ediff-delete-version-file (file) 217(defun ediff-delete-version-file (file)
diff --git a/lisp/ediff.el b/lisp/ediff.el
index 7475834fba6..8911dc599f1 100644
--- a/lisp/ediff.el
+++ b/lisp/ediff.el
@@ -1303,20 +1303,6 @@ buffer."
1303 (intern (format "ediff-%S-merge-internal" ediff-version-control-package)) 1303 (intern (format "ediff-%S-merge-internal" ediff-version-control-package))
1304 rev1 rev2 ancestor-rev startup-hooks merge-buffer-file))) 1304 rev1 rev2 ancestor-rev startup-hooks merge-buffer-file)))
1305 1305
1306;; MK: Check. This function doesn't seem to be used any more by pcvs or pcl-cvs
1307;;;###autoload
1308(defun run-ediff-from-cvs-buffer (pos)
1309 "Run Ediff-merge on appropriate revisions of the selected file.
1310First run after `M-x cvs-update'. Then place the cursor on a line describing a
1311file and then run `run-ediff-from-cvs-buffer'."
1312 (interactive "d")
1313 (ediff-load-version-control)
1314 (let ((tin (tin-locate cvs-cookie-handle pos)))
1315 (if tin
1316 (cvs-run-ediff-on-file-descriptor tin)
1317 (error "There is no file to merge"))))
1318
1319
1320;;; Apply patch 1306;;; Apply patch
1321 1307
1322;;;###autoload 1308;;;###autoload
diff --git a/lisp/emulation/vip.el b/lisp/emulation/vip.el
index c2d00a8ffba..e6fdd55f7c4 100644
--- a/lisp/emulation/vip.el
+++ b/lisp/emulation/vip.el
@@ -874,7 +874,7 @@ is the name of the register for COM."
874 (set-mark beg)) 874 (set-mark beg))
875 (beginning-of-line) 875 (beginning-of-line)
876 (exchange-point-and-mark) 876 (exchange-point-and-mark)
877 (if (or (not (eobp)) (not (bolp))) (next-line 1)) 877 (if (or (not (eobp)) (not (bolp))) (with-no-warnings (next-line 1)))
878 (beginning-of-line) 878 (beginning-of-line)
879 (if (> beg end) (exchange-point-and-mark))) 879 (if (> beg end) (exchange-point-and-mark)))
880 880
@@ -1050,7 +1050,7 @@ command was invoked with argument > 1."
1050(defun vip-line (arg) 1050(defun vip-line (arg)
1051 (let ((val (car arg)) (com (cdr arg))) 1051 (let ((val (car arg)) (com (cdr arg)))
1052 (move-marker vip-com-point (point)) 1052 (move-marker vip-com-point (point))
1053 (next-line (1- val)) 1053 (with-no-warnings (next-line (1- val)))
1054 (vip-execute-com 'vip-line val com))) 1054 (vip-execute-com 'vip-line val com)))
1055 1055
1056(defun vip-yank-line (arg) 1056(defun vip-yank-line (arg)
@@ -1263,7 +1263,7 @@ beginning of buffer, stop and signal error."
1263 (interactive "P") 1263 (interactive "P")
1264 (let ((val (vip-p-val arg)) (com (vip-getCom arg))) 1264 (let ((val (vip-p-val arg)) (com (vip-getCom arg)))
1265 (if com (move-marker vip-com-point (point))) 1265 (if com (move-marker vip-com-point (point)))
1266 (next-line val) 1266 (with-no-warnings (next-line val))
1267 (back-to-indentation) 1267 (back-to-indentation)
1268 (if com (vip-execute-com 'vip-next-line-at-bol val com)))) 1268 (if com (vip-execute-com 'vip-next-line-at-bol val com))))
1269 1269
@@ -1272,7 +1272,7 @@ beginning of buffer, stop and signal error."
1272 (interactive "P") 1272 (interactive "P")
1273 (let ((val (vip-p-val arg)) (com (vip-getCom arg))) 1273 (let ((val (vip-p-val arg)) (com (vip-getCom arg)))
1274 (if com (move-marker vip-com-point (point))) 1274 (if com (move-marker vip-com-point (point)))
1275 (next-line (- val)) 1275 (with-no-warnings (next-line (- val)))
1276 (setq this-command 'previous-line) 1276 (setq this-command 'previous-line)
1277 (if com (vip-execute-com 'vip-previous-line val com)))) 1277 (if com (vip-execute-com 'vip-previous-line val com))))
1278 1278
@@ -1281,7 +1281,7 @@ beginning of buffer, stop and signal error."
1281 (interactive "P") 1281 (interactive "P")
1282 (let ((val (vip-p-val arg)) (com (vip-getCom arg))) 1282 (let ((val (vip-p-val arg)) (com (vip-getCom arg)))
1283 (if com (move-marker vip-com-point (point))) 1283 (if com (move-marker vip-com-point (point)))
1284 (next-line (- val)) 1284 (with-no-warnings (next-line (- val)))
1285 (back-to-indentation) 1285 (back-to-indentation)
1286 (if com (vip-execute-com 'vip-previous-line val com)))) 1286 (if com (vip-execute-com 'vip-previous-line val com))))
1287 1287
@@ -1323,7 +1323,7 @@ after search."
1323 ;; forward search begins here 1323 ;; forward search begins here
1324 (if (eolp) (error "") (point)) 1324 (if (eolp) (error "") (point))
1325 ;; forward search ends here 1325 ;; forward search ends here
1326 (progn (next-line 1) (beginning-of-line) (point))) 1326 (progn (with-no-warnings (next-line 1)) (beginning-of-line) (point)))
1327 (narrow-to-region 1327 (narrow-to-region
1328 ;; backward search begins from here 1328 ;; backward search begins from here
1329 (if (bolp) (error "") (point)) 1329 (if (bolp) (error "") (point))
@@ -1803,7 +1803,7 @@ STRING. Search will be forward if FORWARD, otherwise backward."
1803 (setq vip-use-register nil) 1803 (setq vip-use-register nil)
1804 (if (vip-end-with-a-newline-p text) 1804 (if (vip-end-with-a-newline-p text)
1805 (progn 1805 (progn
1806 (next-line 1) 1806 (with-no-warnings (next-line 1))
1807 (beginning-of-line)) 1807 (beginning-of-line))
1808 (if (and (not (eolp)) (not (eobp))) (forward-char))) 1808 (if (and (not (eolp)) (not (eobp))) (forward-char)))
1809 (setq vip-d-com (list 'vip-put-back val nil vip-use-register)) 1809 (setq vip-d-com (list 'vip-put-back val nil vip-use-register))
@@ -2883,7 +2883,7 @@ a token has type \(command, address, end-mark\) and value."
2883 (let ((point (if (null ex-addresses) (point) (car ex-addresses))) 2883 (let ((point (if (null ex-addresses) (point) (car ex-addresses)))
2884 (variant nil) command file) 2884 (variant nil) command file)
2885 (goto-char point) 2885 (goto-char point)
2886 (if (not (= point 0)) (next-line 1)) 2886 (if (not (= point 0)) (with-no-warnings (next-line 1)))
2887 (beginning-of-line) 2887 (beginning-of-line)
2888 (save-window-excursion 2888 (save-window-excursion
2889 (set-buffer " *ex-working-space*") 2889 (set-buffer " *ex-working-space*")
diff --git a/lisp/iimage.el b/lisp/iimage.el
index 29d98cbda69..f662d9f1042 100644
--- a/lisp/iimage.el
+++ b/lisp/iimage.el
@@ -109,11 +109,7 @@ Examples of image filename regexps:
109 (interactive) 109 (interactive)
110 (iimage-mode 0)) 110 (iimage-mode 0))
111 111
112;; Emacs21.3 or earlier does not heve locate-file. 112(defalias 'iimage-locate-file 'locate-file)
113(if (fboundp 'locate-file)
114 (defalias 'iimage-locate-file 'locate-file)
115 (defun iimage-locate-file (filename path)
116 (locate-library filename t path)))
117 113
118(defun iimage-mode-buffer (arg) 114(defun iimage-mode-buffer (arg)
119"Display/undisplay images. 115"Display/undisplay images.
diff --git a/lisp/mail/mailabbrev.el b/lisp/mail/mailabbrev.el
index 8862e6ca2d2..b75e10096dd 100644
--- a/lisp/mail/mailabbrev.el
+++ b/lisp/mail/mailabbrev.el
@@ -612,7 +612,7 @@ and more reliable (no dependence on goal column, etc.)."
612 (interactive "p") 612 (interactive "p")
613 (if (looking-at "[ \t]*\n") (expand-abbrev)) 613 (if (looking-at "[ \t]*\n") (expand-abbrev))
614 (setq this-command 'next-line) 614 (setq this-command 'next-line)
615 (next-line arg)) 615 (with-no-warnings (next-line arg)))
616 616
617(defun mail-abbrev-end-of-buffer (&optional arg) 617(defun mail-abbrev-end-of-buffer (&optional arg)
618 "Expand any mail abbrev, then move point to end of buffer. 618 "Expand any mail abbrev, then move point to end of buffer.
diff --git a/lisp/progmodes/mixal-mode.el b/lisp/progmodes/mixal-mode.el
index 60dcdc625a8..f4ab9e5e4f3 100644
--- a/lisp/progmodes/mixal-mode.el
+++ b/lisp/progmodes/mixal-mode.el
@@ -1091,15 +1091,19 @@ EXECUTION-TIME holds info about the time it takes, number or string.")
1091(defun mixal-run () 1091(defun mixal-run ()
1092 "Run mixal file in current buffer, assumes that file has been compiled." 1092 "Run mixal file in current buffer, assumes that file has been compiled."
1093 (interactive) 1093 (interactive)
1094 (mixvm (concat "mixvm -r -t -d " 1094 (if (fboundp 'mixvm)
1095 (file-name-sans-extension (buffer-file-name))))) 1095 (mixvm (concat "mixvm -r -t -d "
1096 (file-name-sans-extension (buffer-file-name))))
1097 (error "mixvm.el needs to be loaded to run `mixvm'")))
1096 1098
1097(defun mixal-debug () 1099(defun mixal-debug ()
1098 "Start mixvm for debugging. 1100 "Start mixvm for debugging.
1099Assumes that file has been compiled with debugging support." 1101Assumes that file has been compiled with debugging support."
1100 (interactive) 1102 (interactive)
1101 (mixvm (concat "mixvm " 1103 (if (fboundp 'mixvm)
1102 (file-name-sans-extension (buffer-file-name))))) 1104 (mixvm (concat "mixvm "
1105 (file-name-sans-extension (buffer-file-name))))
1106 (error "mixvm.el needs to be loaded to run `mixvm'")))
1103 1107
1104;;;###autoload 1108;;;###autoload
1105(define-derived-mode mixal-mode fundamental-mode "mixal" 1109(define-derived-mode mixal-mode fundamental-mode "mixal"
diff --git a/lisp/progmodes/simula.el b/lisp/progmodes/simula.el
index db5d6552c84..e0b04cfebe8 100644
--- a/lisp/progmodes/simula.el
+++ b/lisp/progmodes/simula.el
@@ -1615,9 +1615,9 @@ If not nil and not t, move to limit of search and return nil."
1615 (simula-install-standard-abbrevs)) 1615 (simula-install-standard-abbrevs))
1616 1616
1617;; Hilit mode support. 1617;; Hilit mode support.
1618(if (and (fboundp 'hilit-set-mode-patterns) 1618(when (fboundp 'hilit-set-mode-patterns)
1619 (boundp 'hilit-patterns-alist) 1619 (when (and (boundp 'hilit-patterns-alist)
1620 (not (assoc 'simula-mode hilit-patterns-alist))) 1620 (not (assoc 'simula-mode hilit-patterns-alist)))
1621 (hilit-set-mode-patterns 1621 (hilit-set-mode-patterns
1622 'simula-mode 1622 'simula-mode
1623 '( 1623 '(
@@ -1626,7 +1626,7 @@ If not nil and not t, move to limit of search and return nil."
1626 ("\"[^\"\n]*\"\\|'.'\\|'![0-9]+!'" nil string) 1626 ("\"[^\"\n]*\"\\|'.'\\|'![0-9]+!'" nil string)
1627 ("\\<\\(ACTIVATE\\|AFTER\\|AND\\|ARRAY\\|AT\\|BEFORE\\|BEGIN\\|BOOLEAN\\|CHARACTER\\|CLASS\\|DELAY\\|DO\\|ELSE\\|END\\|EQ\\|EQV\\|EXTERNAL\\|FALSE\\|FOR\\|GE\\|GO\\|GOTO\\|GT\\|HIDDEN\\|IF\\|IMP\\|IN\\|INNER\\|INSPECT\\|INTEGER\\|IS\\|LABEL\\|LE\\|LONG\\|LT\\|NAME\\|NE\\|NEW\\|NONE\\|NOT\\|NOTEXT\\|OR\\|OTHERWISE\\|PRIOR\\|PROCEDURE\\|PROTECTED\\|QUA\\|REACTIVATE\\|REAL\\|REF\\|SHORT\\|STEP\\|SWITCH\\|TEXT\\|THEN\\|THIS\\|TO\\|TRUE\\|UNTIL\\|VALUE\\|VIRTUAL\\|WHEN\\|WHILE\\)\\>" nil keyword) 1627 ("\\<\\(ACTIVATE\\|AFTER\\|AND\\|ARRAY\\|AT\\|BEFORE\\|BEGIN\\|BOOLEAN\\|CHARACTER\\|CLASS\\|DELAY\\|DO\\|ELSE\\|END\\|EQ\\|EQV\\|EXTERNAL\\|FALSE\\|FOR\\|GE\\|GO\\|GOTO\\|GT\\|HIDDEN\\|IF\\|IMP\\|IN\\|INNER\\|INSPECT\\|INTEGER\\|IS\\|LABEL\\|LE\\|LONG\\|LT\\|NAME\\|NE\\|NEW\\|NONE\\|NOT\\|NOTEXT\\|OR\\|OTHERWISE\\|PRIOR\\|PROCEDURE\\|PROTECTED\\|QUA\\|REACTIVATE\\|REAL\\|REF\\|SHORT\\|STEP\\|SWITCH\\|TEXT\\|THEN\\|THIS\\|TO\\|TRUE\\|UNTIL\\|VALUE\\|VIRTUAL\\|WHEN\\|WHILE\\)\\>" nil keyword)
1628 ("!\\|\\<COMMENT\\>" ";" comment)) 1628 ("!\\|\\<COMMENT\\>" ";" comment))
1629 nil 'case-insensitive)) 1629 nil 'case-insensitive)))
1630 1630
1631;; defuns for submitting bug reports 1631;; defuns for submitting bug reports
1632 1632
diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el
index 0c1beb17763..5383d88c386 100644
--- a/lisp/textmodes/reftex.el
+++ b/lisp/textmodes/reftex.el
@@ -338,6 +338,169 @@
338(defvar reftex-toc-auto-recenter-timer nil 338(defvar reftex-toc-auto-recenter-timer nil
339 "The idle timer used to recenter the toc window.") 339 "The idle timer used to recenter the toc window.")
340 340
341;;; =========================================================================
342;;;
343;;; Parser functions
344
345(autoload 'reftex-parse-one "reftex-parse"
346 "Re-parse this file." t)
347(autoload 'reftex-parse-all "reftex-parse"
348 "Re-parse entire document." t)
349(autoload 'reftex-do-parse "reftex-parse")
350(autoload 'reftex-where-am-I "reftex-parse")
351(autoload 'reftex-init-section-numbers "reftex-parse")
352(autoload 'reftex-section-info "reftex-parse")
353(autoload 'reftex-section-number "reftex-parse")
354(autoload 'reftex-what-macro "reftex-parse")
355(autoload 'reftex-what-macro-safe "reftex-parse")
356(autoload 'reftex-index-info "reftex-parse")
357(autoload 'reftex-index-info-safe "reftex-parse")
358(autoload 'reftex-short-context "reftex-parse")
359(autoload 'reftex-what-environment "reftex-parse")
360(autoload 'reftex-what-special-env "reftex-parse")
361(autoload 'reftex-move-over-touching-args "reftex-parse")
362(autoload 'reftex-notice-new "reftex-parse")
363(autoload 'reftex-nth-arg "reftex-parse")
364(autoload 'reftex-locate-bibliography-files "reftex-parse")
365(autoload 'reftex-ensure-index-support "reftex-parse")
366(autoload 'reftex-everything-regexp "reftex-parse")
367
368
369;;; =========================================================================
370;;;
371;;; Labels and References
372
373(autoload 'reftex-label-location "reftex-ref")
374(autoload 'reftex-label-info-update "reftex-ref")
375(autoload 'reftex-label-info "reftex-ref")
376(autoload 'reftex-label "reftex-ref"
377 "Insert a unique label." t)
378(autoload 'reftex-reference "reftex-ref"
379 "Make a LaTeX reference." t)
380(autoload 'reftex-varioref-vref "reftex-ref"
381 "Make a varioref reference." t)
382(autoload 'reftex-fancyref-fref "reftex-ref"
383 "Make a fancyref \\fref reference." t)
384(autoload 'reftex-fancyref-Fref "reftex-ref"
385 "Make a fancyref \\Fref reference." t)
386(autoload 'reftex-show-label-location "reftex-ref")
387(autoload 'reftex-query-label-type "reftex-ref")
388(autoload 'reftex-goto-label "reftex-ref"
389 "Prompt for label name and go to that location." t)
390
391;;; =========================================================================
392;;;
393;;; Table of contents
394
395(autoload 'reftex-toc "reftex-toc"
396 "Show the table of contents for the current document." t)
397(autoload 'reftex-toc-recenter "reftex-toc"
398 "Display the TOC window and highlight line corresponding to current position." t)
399(autoload 'reftex-toggle-auto-toc-recenter "reftex-toc"
400 "Toggle automatic recentering of TOC window." t)
401
402;;; =========================================================================
403;;;
404;;; BibTeX citations.
405
406(autoload 'reftex-citep "reftex-cite")
407(autoload 'reftex-citet "reftex-cite")
408(autoload 'reftex-make-cite-echo-string "reftex-cite")
409(autoload 'reftex-get-bibfile-list "reftex-cite")
410(autoload 'reftex-pop-to-bibtex-entry "reftex-cite")
411(autoload 'reftex-end-of-bib-entry "reftex-cite")
412(autoload 'reftex-parse-bibtex-entry "reftex-cite")
413(autoload 'reftex-citation "reftex-cite"
414 "Make a citation using BibTeX database files." t)
415(autoload 'reftex-default-bibliography "reftex-cite")
416(autoload 'reftex-bib-or-thebib "reftex-cite")
417(autoload 'reftex-create-bibtex-file "reftex-cite")
418
419;;; =========================================================================
420;;;
421;;; Selection
422
423(autoload 'reftex-select-label-mode "reftex-sel")
424(autoload 'reftex-select-bib-mode "reftex-sel")
425(autoload 'reftex-find-start-point "reftex-sel")
426(autoload 'reftex-insert-docstruct "reftex-sel")
427(autoload 'reftex-get-offset "reftex-sel")
428(autoload 'reftex-select-item "reftex-sel")
429
430
431;;; =========================================================================
432;;;
433;;; Index support
434
435(autoload 'reftex-index "reftex-index"
436 "Query for an index macro and insert it along with its argments." t)
437(autoload 'reftex-index-selection-or-word "reftex-index"
438 "Put selection or the word near point into the default index macro." t)
439(autoload 'reftex-index-phrase-selection-or-word "reftex-index"
440 "Put selection or the word near point into Index Phrases File." t)
441(autoload 'reftex-display-index "reftex-index"
442 "Display a buffer with an index compiled from the current document." t)
443(autoload 'reftex-index-visit-phrases-buffer "reftex-index"
444 "Visit the Index Phrases File." t)
445(autoload 'reftex-index-phrases-mode "reftex-index"
446 "Major mode for managing the Index phrases of a LaTeX document." t)
447(autoload 'reftex-index-complete-tag "reftex-index")
448(autoload 'reftex-index-complete-key "reftex-index")
449(autoload 'reftex-index-show-entry "reftex-index")
450(autoload 'reftex-index-select-tag "reftex-index")
451
452
453;;; =========================================================================
454;;;
455;;; View cross references
456
457(autoload 'reftex-view-crossref "reftex-dcr"
458 "View cross reference of \\ref or \\cite macro at point." t)
459(autoload 'reftex-mouse-view-crossref "reftex-dcr"
460 "View cross reference of \\ref or \\cite macro where you click." t)
461(autoload 'reftex-toggle-auto-view-crossref "reftex-dcr")
462(autoload 'reftex-view-crossref-from-bibtex "reftex-dcr"
463 "View location in a LaTeX document which cites the BibTeX entry at point." t)
464
465
466;;; =========================================================================
467;;;
468;;; Operations on entire Multifile documents
469
470(autoload 'reftex-create-tags-file "reftex-global"
471 "Create TAGS file by running `etags' on the current document." t)
472(autoload 'reftex-grep-document "reftex-global"
473 "Run grep query through all files related to this document." t)
474(autoload 'reftex-search-document "reftex-global"
475 "Regexp search through all files of the current TeX document." t)
476(autoload 'reftex-query-replace-document "reftex-global"
477 "Run a query-replace-regexp of FROM with TO over the entire TeX document." t)
478(autoload 'reftex-find-duplicate-labels "reftex-global"
479 "Produce a list of all duplicate labels in the document." t)
480(autoload 'reftex-change-label "reftex-global"
481 "Query replace FROM with TO in all \\label and \\ref commands." t)
482(autoload 'reftex-renumber-simple-labels "reftex-global"
483 "Renumber all simple labels in the document to make them sequentially." t)
484(autoload 'reftex-save-all-document-buffers "reftex-global"
485 "Save all documents associated with the current document." t)
486
487
488;;; =========================================================================
489;;;
490;;; AUCTeX Interface
491
492(autoload 'reftex-arg-label "reftex-auc")
493(autoload 'reftex-arg-cite "reftex-auc")
494(autoload 'reftex-arg-index-tag "reftex-auc")
495(autoload 'reftex-arg-index "reftex-auc")
496(autoload 'reftex-plug-into-AUCTeX "reftex-auc")
497(autoload 'reftex-toggle-plug-into-AUCTeX "reftex-auc"
498 "Toggle Interface between AUCTeX and RefTeX on and off." t)
499(autoload 'reftex-add-label-environments "reftex-auc")
500(autoload 'reftex-add-to-label-alist "reftex-auc")
501(autoload 'reftex-add-section-levels "reftex-auc")
502(autoload 'reftex-notice-new-section "reftex-auc")
503
341;;;###autoload 504;;;###autoload
342(defun turn-on-reftex () 505(defun turn-on-reftex ()
343 "Turn on RefTeX mode." 506 "Turn on RefTeX mode."
@@ -1608,169 +1771,6 @@ When DIE is non-nil, throw an error if file not found."
1608 1771
1609;;; ========================================================================= 1772;;; =========================================================================
1610;;; 1773;;;
1611;;; Parser functions
1612
1613(autoload 'reftex-parse-one "reftex-parse"
1614 "Re-parse this file." t)
1615(autoload 'reftex-parse-all "reftex-parse"
1616 "Re-parse entire document." t)
1617(autoload 'reftex-do-parse "reftex-parse")
1618(autoload 'reftex-where-am-I "reftex-parse")
1619(autoload 'reftex-init-section-numbers "reftex-parse")
1620(autoload 'reftex-section-info "reftex-parse")
1621(autoload 'reftex-section-number "reftex-parse")
1622(autoload 'reftex-what-macro "reftex-parse")
1623(autoload 'reftex-what-macro-safe "reftex-parse")
1624(autoload 'reftex-index-info "reftex-parse")
1625(autoload 'reftex-index-info-safe "reftex-parse")
1626(autoload 'reftex-short-context "reftex-parse")
1627(autoload 'reftex-what-environment "reftex-parse")
1628(autoload 'reftex-what-special-env "reftex-parse")
1629(autoload 'reftex-move-over-touching-args "reftex-parse")
1630(autoload 'reftex-notice-new "reftex-parse")
1631(autoload 'reftex-nth-arg "reftex-parse")
1632(autoload 'reftex-locate-bibliography-files "reftex-parse")
1633(autoload 'reftex-ensure-index-support "reftex-parse")
1634(autoload 'reftex-everything-regexp "reftex-parse")
1635
1636
1637;;; =========================================================================
1638;;;
1639;;; Labels and References
1640
1641(autoload 'reftex-label-location "reftex-ref")
1642(autoload 'reftex-label-info-update "reftex-ref")
1643(autoload 'reftex-label-info "reftex-ref")
1644(autoload 'reftex-label "reftex-ref"
1645 "Insert a unique label." t)
1646(autoload 'reftex-reference "reftex-ref"
1647 "Make a LaTeX reference." t)
1648(autoload 'reftex-varioref-vref "reftex-ref"
1649 "Make a varioref reference." t)
1650(autoload 'reftex-fancyref-fref "reftex-ref"
1651 "Make a fancyref \\fref reference." t)
1652(autoload 'reftex-fancyref-Fref "reftex-ref"
1653 "Make a fancyref \\Fref reference." t)
1654(autoload 'reftex-show-label-location "reftex-ref")
1655(autoload 'reftex-query-label-type "reftex-ref")
1656(autoload 'reftex-goto-label "reftex-ref"
1657 "Prompt for label name and go to that location." t)
1658
1659;;; =========================================================================
1660;;;
1661;;; Table of contents
1662
1663(autoload 'reftex-toc "reftex-toc"
1664 "Show the table of contents for the current document." t)
1665(autoload 'reftex-toc-recenter "reftex-toc"
1666 "Display the TOC window and highlight line corresponding to current position." t)
1667(autoload 'reftex-toggle-auto-toc-recenter "reftex-toc"
1668 "Toggle automatic recentering of TOC window." t)
1669
1670;;; =========================================================================
1671;;;
1672;;; BibTeX citations.
1673
1674(autoload 'reftex-citep "reftex-cite")
1675(autoload 'reftex-citet "reftex-cite")
1676(autoload 'reftex-make-cite-echo-string "reftex-cite")
1677(autoload 'reftex-get-bibfile-list "reftex-cite")
1678(autoload 'reftex-pop-to-bibtex-entry "reftex-cite")
1679(autoload 'reftex-end-of-bib-entry "reftex-cite")
1680(autoload 'reftex-parse-bibtex-entry "reftex-cite")
1681(autoload 'reftex-citation "reftex-cite"
1682 "Make a citation using BibTeX database files." t)
1683(autoload 'reftex-default-bibliography "reftex-cite")
1684(autoload 'reftex-bib-or-thebib "reftex-cite")
1685(autoload 'reftex-create-bibtex-file "reftex-cite")
1686
1687;;; =========================================================================
1688;;;
1689;;; Selection
1690
1691(autoload 'reftex-select-label-mode "reftex-sel")
1692(autoload 'reftex-select-bib-mode "reftex-sel")
1693(autoload 'reftex-find-start-point "reftex-sel")
1694(autoload 'reftex-insert-docstruct "reftex-sel")
1695(autoload 'reftex-get-offset "reftex-sel")
1696(autoload 'reftex-select-item "reftex-sel")
1697
1698
1699;;; =========================================================================
1700;;;
1701;;; Index support
1702
1703(autoload 'reftex-index "reftex-index"
1704 "Query for an index macro and insert it along with its argments." t)
1705(autoload 'reftex-index-selection-or-word "reftex-index"
1706 "Put selection or the word near point into the default index macro." t)
1707(autoload 'reftex-index-phrase-selection-or-word "reftex-index"
1708 "Put selection or the word near point into Index Phrases File." t)
1709(autoload 'reftex-display-index "reftex-index"
1710 "Display a buffer with an index compiled from the current document." t)
1711(autoload 'reftex-index-visit-phrases-buffer "reftex-index"
1712 "Visit the Index Phrases File." t)
1713(autoload 'reftex-index-phrases-mode "reftex-index"
1714 "Major mode for managing the Index phrases of a LaTeX document." t)
1715(autoload 'reftex-index-complete-tag "reftex-index")
1716(autoload 'reftex-index-complete-key "reftex-index")
1717(autoload 'reftex-index-show-entry "reftex-index")
1718(autoload 'reftex-index-select-tag "reftex-index")
1719
1720
1721;;; =========================================================================
1722;;;
1723;;; View cross references
1724
1725(autoload 'reftex-view-crossref "reftex-dcr"
1726 "View cross reference of \\ref or \\cite macro at point." t)
1727(autoload 'reftex-mouse-view-crossref "reftex-dcr"
1728 "View cross reference of \\ref or \\cite macro where you click." t)
1729(autoload 'reftex-toggle-auto-view-crossref "reftex-dcr")
1730(autoload 'reftex-view-crossref-from-bibtex "reftex-dcr"
1731 "View location in a LaTeX document which cites the BibTeX entry at point." t)
1732
1733
1734;;; =========================================================================
1735;;;
1736;;; Operations on entire Multifile documents
1737
1738(autoload 'reftex-create-tags-file "reftex-global"
1739 "Create TAGS file by running `etags' on the current document." t)
1740(autoload 'reftex-grep-document "reftex-global"
1741 "Run grep query through all files related to this document." t)
1742(autoload 'reftex-search-document "reftex-global"
1743 "Regexp search through all files of the current TeX document." t)
1744(autoload 'reftex-query-replace-document "reftex-global"
1745 "Run a query-replace-regexp of FROM with TO over the entire TeX document." t)
1746(autoload 'reftex-find-duplicate-labels "reftex-global"
1747 "Produce a list of all duplicate labels in the document." t)
1748(autoload 'reftex-change-label "reftex-global"
1749 "Query replace FROM with TO in all \\label and \\ref commands." t)
1750(autoload 'reftex-renumber-simple-labels "reftex-global"
1751 "Renumber all simple labels in the document to make them sequentially." t)
1752(autoload 'reftex-save-all-document-buffers "reftex-global"
1753 "Save all documents associated with the current document." t)
1754
1755
1756;;; =========================================================================
1757;;;
1758;;; AUCTeX Interface
1759
1760(autoload 'reftex-arg-label "reftex-auc")
1761(autoload 'reftex-arg-cite "reftex-auc")
1762(autoload 'reftex-arg-index-tag "reftex-auc")
1763(autoload 'reftex-arg-index "reftex-auc")
1764(autoload 'reftex-plug-into-AUCTeX "reftex-auc")
1765(autoload 'reftex-toggle-plug-into-AUCTeX "reftex-auc"
1766 "Toggle Interface between AUCTeX and RefTeX on and off." t)
1767(autoload 'reftex-add-label-environments "reftex-auc")
1768(autoload 'reftex-add-to-label-alist "reftex-auc")
1769(autoload 'reftex-add-section-levels "reftex-auc")
1770(autoload 'reftex-notice-new-section "reftex-auc")
1771
1772;;; =========================================================================
1773;;;
1774;;; Some generally useful functions 1774;;; Some generally useful functions
1775 1775
1776(defun reftex-typekey-check (typekey conf-variable &optional n) 1776(defun reftex-typekey-check (typekey conf-variable &optional n)
@@ -2334,16 +2334,14 @@ IGNORE-WORDS List of words which should be removed from the string."
2334 (if (facep face) (throw 'exit face))))))) 2334 (if (facep face) (throw 'exit face)))))))
2335 2335
2336;; Highlighting uses overlays. For XEmacs, we use extends. 2336;; Highlighting uses overlays. For XEmacs, we use extends.
2337(if (featurep 'xemacs) 2337(defalias 'reftex-make-overlay
2338 (progn 2338 (if (featurep 'xemacs) 'make-extent 'make-overlay))
2339 (defalias 'reftex-make-overlay 'make-extent) 2339(defalias 'reftex-overlay-put
2340 (defalias 'reftex-overlay-put 'set-extent-property) 2340 (if (featurep 'xemacs) 'set-extent-property 'overlay-put))
2341 (defalias 'reftex-move-overlay 'set-extent-endpoints) 2341(defalias 'reftex-move-overlay
2342 (defalias 'reftex-delete-overlay 'detach-extent)) 2342 (if (featurep 'xemacs) 'set-extent-endpoints 'move-overlay))
2343 (defalias 'reftex-make-overlay 'make-overlay) 2343(defalias 'reftex-delete-overlay
2344 (defalias 'reftex-overlay-put 'overlay-put) 2344 (if (featurep 'xemacs) 'detach-extent 'delete-overlay))
2345 (defalias 'reftex-move-overlay 'move-overlay)
2346 (defalias 'reftex-delete-overlay 'delete-overlay))
2347 2345
2348;; We keep a vector with several different overlays to do our highlighting. 2346;; We keep a vector with several different overlays to do our highlighting.
2349(defvar reftex-highlight-overlays [nil nil nil]) 2347(defvar reftex-highlight-overlays [nil nil nil])