diff options
| author | Carsten Dominik | 2006-02-22 08:56:27 +0000 |
|---|---|---|
| committer | Carsten Dominik | 2006-02-22 08:56:27 +0000 |
| commit | c7cf105d97c6e62b36da6f4a990fcefd17e1bbb3 (patch) | |
| tree | 713eab9203705f62ebed5d2a71deb74316a7ebbe | |
| parent | b6e3efe044c0afb0b0a0c01c1cb846dde058adbc (diff) | |
| download | emacs-c7cf105d97c6e62b36da6f4a990fcefd17e1bbb3.tar.gz emacs-c7cf105d97c6e62b36da6f4a990fcefd17e1bbb3.zip | |
*** empty log message ***
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/textmodes/reftex.el | 44 |
2 files changed, 3 insertions, 44 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2f862ee0b7a..d6b3f9ad435 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2006-02-22 Carsten Dominik <dominik@science.uva.nl> | 1 | 2006-02-22 Carsten Dominik <dominik@science.uva.nl> |
| 2 | 2 | ||
| 3 | * textmodes/reftex.el (reftex-locate-file): Removed duplicate | ||
| 4 | function. | ||
| 5 | |||
| 3 | * textmodes/reftex-vars.el: (reftex-try-all-extensions): New | 6 | * textmodes/reftex-vars.el: (reftex-try-all-extensions): New |
| 4 | option. | 7 | option. |
| 5 | 8 | ||
diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el index b8ed941fcae..d759aff8774 100644 --- a/lisp/textmodes/reftex.el +++ b/lisp/textmodes/reftex.el | |||
| @@ -1437,50 +1437,6 @@ When DIE is non-nil, throw an error if file not found." | |||
| 1437 | "\\)\\'")) | 1437 | "\\)\\'")) |
| 1438 | (files (if (string-match ext-re file) | 1438 | (files (if (string-match ext-re file) |
| 1439 | (cons file nil) | 1439 | (cons file nil) |
| 1440 | (cons (concat file def-ext) file))) | ||
| 1441 | path old-path file1) | ||
| 1442 | (cond | ||
| 1443 | ((file-name-absolute-p file) | ||
| 1444 | (setq file1 | ||
| 1445 | (or | ||
| 1446 | (and (car files) (file-regular-p (car files)) (car files)) | ||
| 1447 | (and (cdr files) (file-regular-p (cdr files)) (cdr files))))) | ||
| 1448 | ((and reftex-use-external-file-finders | ||
| 1449 | (assoc type reftex-external-file-finders)) | ||
| 1450 | (setq file1 (reftex-find-file-externally file type master-dir))) | ||
| 1451 | (t | ||
| 1452 | (while (and (null file1) rec-values) | ||
| 1453 | (setq path (reftex-access-search-path | ||
| 1454 | type (pop rec-values) master-dir file)) | ||
| 1455 | (if (or (null old-path) | ||
| 1456 | (not (eq old-path path))) | ||
| 1457 | (setq old-path path | ||
| 1458 | path (cons master-dir path) | ||
| 1459 | file1 (or (and (car files) | ||
| 1460 | (reftex-find-file-on-path | ||
| 1461 | (car files) path master-dir)) | ||
| 1462 | (and (cdr files) | ||
| 1463 | (reftex-find-file-on-path | ||
| 1464 | (cdr files) path master-dir)))))))) | ||
| 1465 | (cond (file1 file1) | ||
| 1466 | (die (error "No such file: %s" file) nil) | ||
| 1467 | (t (message "No such file: %s (ignored)" file) nil)))) | ||
| 1468 | |||
| 1469 | |||
| 1470 | ;; FIXME: this still needs testing and thinking. | ||
| 1471 | (defun reftex-locate-file (file type master-dir &optional die) | ||
| 1472 | "Find FILE of type TYPE in MASTER-DIR or on the path associcted with TYPE. | ||
| 1473 | If the file does not have any of the valid extensions for TYPE, | ||
| 1474 | try first the default extension and only then the naked file name. | ||
| 1475 | When DIE is non-nil, throw an error if file not found." | ||
| 1476 | (let* ((rec-values (if reftex-search-unrecursed-path-first '(nil t) '(t))) | ||
| 1477 | (extensions (cdr (assoc type reftex-file-extensions))) | ||
| 1478 | (def-ext (car extensions)) | ||
| 1479 | (ext-re (concat "\\(" | ||
| 1480 | (mapconcat 'regexp-quote extensions "\\|") | ||
| 1481 | "\\)\\'")) | ||
| 1482 | (files (if (string-match ext-re file) | ||
| 1483 | (cons file nil) | ||
| 1484 | (if reftex-try-all-extensions | 1440 | (if reftex-try-all-extensions |
| 1485 | (append (mapcar (lambda (x) (concat file x)) | 1441 | (append (mapcar (lambda (x) (concat file x)) |
| 1486 | extensions) | 1442 | extensions) |