summaryrefslogtreecommitdiff
path: root/lisp/textmodes/reftex-global.el
diff options
context:
space:
mode:
authorJuanma Barranquero <lekktu@gmail.com>2005-08-31 10:29:27 +0000
committerJuanma Barranquero <lekktu@gmail.com>2005-08-31 10:29:27 +0000
commit8ac77839c7d5246d6ea93c3f28a98473d1907f9b (patch)
tree328aa83e55d94a18e57229e1f80d84460e18ef04 /lisp/textmodes/reftex-global.el
parentae48944514a529eb78caff789171393fa6c82287 (diff)
downloademacs-8ac77839c7d5246d6ea93c3f28a98473d1907f9b.tar.gz
(isearch-next-buffer-function, TeX-master): Add defvars.
Diffstat (limited to 'lisp/textmodes/reftex-global.el')
-rw-r--r--lisp/textmodes/reftex-global.el25
1 files changed, 14 insertions, 11 deletions
diff --git a/lisp/textmodes/reftex-global.el b/lisp/textmodes/reftex-global.el
index 281e852a40d..3b5c51d2c9d 100644
--- a/lisp/textmodes/reftex-global.el
+++ b/lisp/textmodes/reftex-global.el
@@ -32,6 +32,9 @@
(require 'reftex)
;;;
+(defvar isearch-next-buffer-function)
+(defvar TeX-master)
+
(defun reftex-create-tags-file ()
"Create TAGS file by running `etags' on the current document.
The TAGS file is also immediately visited with `visit-tags-table'."
@@ -137,7 +140,7 @@ No active TAGS table is required."
(set (make-local-variable 'TeX-master) master)
(erase-buffer)
(insert " MULTIPLE LABELS IN CURRENT DOCUMENT:\n")
- (insert
+ (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")
@@ -195,8 +198,8 @@ one with the `xr' package."
(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 "\\|")
+ (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]+\\)\\)[,}]"))
@@ -229,11 +232,11 @@ one with the `xr' package."
(reftex-save-all-document-buffers)
;; First test to check for erros
- (setq n (reftex-translate
+ (setq n (reftex-translate
files search-re translate-alist error-fmt 'test))
;; Now the real thing.
- (if (yes-or-no-p
+ (if (yes-or-no-p
(format "Replace %d items at %d places in %d files? "
(length translate-alist) n (length files)))
(progn
@@ -251,9 +254,9 @@ one with the `xr' package."
(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.
+ ;; its association in TRANSLATE-ALSIT.
;; If we do not find an association and TEST is non-nil, query
- ;; to ignore the problematic string.
+ ;; 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)
@@ -279,7 +282,7 @@ one with the `xr' package."
(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
+ (looking-at (format
reftex-find-label-regexp-format
(regexp-quote label)))))
;; OK, we should replace it.
@@ -342,7 +345,7 @@ Also checks if buffers visiting the files are in read-only mode."
(defun reftex-isearch-wrap-function ()
(if (not isearch-word)
- (switch-to-buffer
+ (switch-to-buffer
(funcall isearch-next-buffer-function (current-buffer) t)))
(goto-char (if isearch-forward (point-min) (point-max))))
@@ -428,7 +431,7 @@ With no argument, this command toggles
`reftex-isearch-minor-mode' on iff ARG is positive."
(interactive "P")
(let ((old-reftex-isearch-minor-mode reftex-isearch-minor-mode))
- (setq reftex-isearch-minor-mode
+ (setq reftex-isearch-minor-mode
(not (or (and (null arg) reftex-isearch-minor-mode)
(<= (prefix-numeric-value arg) 0))))
(unless (eq reftex-isearch-minor-mode old-reftex-isearch-minor-mode)
@@ -459,7 +462,7 @@ With no argument, this command toggles
;; Force modeline redisplay.
(set-buffer-modified-p (buffer-modified-p))))
-(add-minor-mode 'reftex-isearch-minor-mode "/I" nil nil
+(add-minor-mode 'reftex-isearch-minor-mode "/I" nil nil
'reftex-isearch-minor-mode)
;;; arch-tag: 2dbf7633-92c8-4340-8656-7aa019d0f80d