Mercurial > emacs
comparison lisp/textmodes/reftex-global.el @ 94415:8173b23112ae
(reftex-isearch-switch-to-next-file): Remove un-needed local `orig-list'.
Replace cl `copy-list'.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Sun, 27 Apr 2008 18:42:45 +0000 |
parents | 1e3a407766b9 |
children | f4a69fedbd46 |
comparison
equal
deleted
inserted
replaced
94414:d86cb59eea9f | 94415:8173b23112ae |
---|---|
404 ;;; buffer and switches to the next/previous one in the logical order | 404 ;;; buffer and switches to the next/previous one in the logical order |
405 ;;; of the document. If WRAPP is true then wrap the search to the | 405 ;;; of the document. If WRAPP is true then wrap the search to the |
406 ;;; beginning/end of the file list, depending of the search direction. | 406 ;;; beginning/end of the file list, depending of the search direction. |
407 (defun reftex-isearch-switch-to-next-file (crt-buf &optional wrapp) | 407 (defun reftex-isearch-switch-to-next-file (crt-buf &optional wrapp) |
408 (reftex-access-scan-info) | 408 (reftex-access-scan-info) |
409 (let* ((cb (buffer-file-name crt-buf)) | 409 (let ((cb (buffer-file-name crt-buf)) |
410 (flist (reftex-all-document-files)) | 410 (flist (reftex-all-document-files))) |
411 (orig-flist flist)) | |
412 (when flist | 411 (when flist |
413 (if wrapp | 412 (if wrapp |
414 (unless isearch-forward | 413 (unless isearch-forward |
415 (setq flist (last flist))) | 414 (setq flist (last flist))) |
416 (unless isearch-forward | 415 (unless isearch-forward |
417 (setq flist (nreverse (copy-list flist))) | 416 (setq flist (reverse flist))) |
418 (setq orig-flist flist)) | |
419 (while (not (string= (car flist) cb)) | 417 (while (not (string= (car flist) cb)) |
420 (setq flist (cdr flist))) | 418 (setq flist (cdr flist))) |
421 (setq flist (cdr flist))) | 419 (setq flist (cdr flist))) |
422 (when flist | 420 (when flist |
423 (find-file (car flist)))))) | 421 (find-file (car flist)))))) |
424 | 422 |
425 ;;;###autoload | 423 ;;;###autoload |
426 (defun reftex-isearch-minor-mode (&optional arg) | 424 (defun reftex-isearch-minor-mode (&optional arg) |
427 "When on, isearch searches the whole document, not only the current file. | 425 "When on, isearch searches the whole document, not only the current file. |
428 This minor mode allows isearch to search through all the files of | 426 This minor mode allows isearch to search through all the files of |