[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/textmodes/reftex-global.el
From: |
Juanma Barranquero |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/textmodes/reftex-global.el |
Date: |
Tue, 04 Feb 2003 08:30:48 -0500 |
Index: emacs/lisp/textmodes/reftex-global.el
diff -c emacs/lisp/textmodes/reftex-global.el:1.13
emacs/lisp/textmodes/reftex-global.el:1.14
*** emacs/lisp/textmodes/reftex-global.el:1.13 Thu Jul 25 03:03:41 2002
--- emacs/lisp/textmodes/reftex-global.el Tue Feb 4 08:30:45 2003
***************
*** 135,141 ****
(set (make-local-variable 'TeX-master) master)
(erase-buffer)
(insert " MULTIPLE LABELS IN CURRENT DOCUMENT:\n")
! (insert
" Move point to label and type `r' to run a query-replace on the label\n"
" and its references. Type `q' to exit this buffer.\n\n")
(insert " LABEL FILE\n")
--- 135,141 ----
(set (make-local-variable 'TeX-master) master)
(erase-buffer)
(insert " MULTIPLE LABELS IN CURRENT DOCUMENT:\n")
! (insert
" Move point to label and type `r' to run a query-replace on the label\n"
" and its references. Type `q' to exit this buffer.\n\n")
(insert " LABEL FILE\n")
***************
*** 193,200 ****
(not (yes-or-no-p "Replacing all simple labels in multiple files is
risky. Continue? ")))
(error "Abort"))
;; Make the translation list
! (let* ((re-core (concat "\\("
! (mapconcat 'cdr reftex-typekey-to-prefix-alist "\\|")
"\\)"))
(label-re (concat "\\`" re-core "\\([0-9]+\\)\\'"))
(search-re (concat "[{,]\\(" re-core "\\([0-9]+\\)\\)[,}]"))
--- 193,200 ----
(not (yes-or-no-p "Replacing all simple labels in multiple files is
risky. Continue? ")))
(error "Abort"))
;; Make the translation list
! (let* ((re-core (concat "\\("
! (mapconcat 'cdr reftex-typekey-to-prefix-alist "\\|")
"\\)"))
(label-re (concat "\\`" re-core "\\([0-9]+\\)\\'"))
(search-re (concat "[{,]\\(" re-core "\\([0-9]+\\)\\)[,}]"))
***************
*** 227,237 ****
(reftex-save-all-document-buffers)
;; First test to check for erros
! (setq n (reftex-translate
files search-re translate-alist error-fmt 'test))
;; Now the real thing.
! (if (yes-or-no-p
(format "Replace %d items at %d places in %d files? "
(length translate-alist) n (length files)))
(progn
--- 227,237 ----
(reftex-save-all-document-buffers)
;; First test to check for erros
! (setq n (reftex-translate
files search-re translate-alist error-fmt 'test))
;; Now the real thing.
! (if (yes-or-no-p
(format "Replace %d items at %d places in %d files? "
(length translate-alist) n (length files)))
(progn
***************
*** 249,257 ****
(defun reftex-translate (files search-re translate-alist error-fmt test)
;; In FILES, look for SEARCH-RE and replace match 1 of it with
! ;; its association in TRANSLATE-ALSIT.
;; If we do not find an association and TEST is non-nil, query
! ;; to ignore the problematic string.
;; If TEST is nil, it is ignored without query.
;; Return the number of replacements.
(let ((n 0) file label match-data buf macro pos cell)
--- 249,257 ----
(defun reftex-translate (files search-re translate-alist error-fmt test)
;; In FILES, look for SEARCH-RE and replace match 1 of it with
! ;; its association in TRANSLATE-ALSIT.
;; If we do not find an association and TEST is non-nil, query
! ;; to ignore the problematic string.
;; If TEST is nil, it is ignored without query.
;; Return the number of replacements.
(let ((n 0) file label match-data buf macro pos cell)
***************
*** 277,283 ****
(or (looking-at "\\\\ref")
(looking-at
"\\\\[a-zA-Z]*ref\\(range\\)?[^a-zA-Z]")
(looking-at "\\\\ref[a-zA-Z]*[^a-zA-Z]")
! (looking-at (format
reftex-find-label-regexp-format
(regexp-quote label)))))
;; OK, we should replace it.
--- 277,283 ----
(or (looking-at "\\\\ref")
(looking-at
"\\\\[a-zA-Z]*ref\\(range\\)?[^a-zA-Z]")
(looking-at "\\\\ref[a-zA-Z]*[^a-zA-Z]")
! (looking-at (format
reftex-find-label-regexp-format
(regexp-quote label)))))
;; OK, we should replace it.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/textmodes/reftex-global.el,
Juanma Barranquero <=