emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/textmodes/reftex-dcr.el


From: Juanma Barranquero
Subject: [Emacs-diffs] Changes to emacs/lisp/textmodes/reftex-dcr.el
Date: Tue, 04 Feb 2003 08:30:48 -0500

Index: emacs/lisp/textmodes/reftex-dcr.el
diff -c emacs/lisp/textmodes/reftex-dcr.el:1.12 
emacs/lisp/textmodes/reftex-dcr.el:1.13
*** emacs/lisp/textmodes/reftex-dcr.el:1.12     Tue Aug 20 06:41:01 2002
--- emacs/lisp/textmodes/reftex-dcr.el  Tue Feb  4 08:30:45 2003
***************
*** 86,92 ****
                (format reftex-find-index-entry-regexp-format
                        (regexp-quote key))
                3 nil nil)))
!      (t 
        (reftex-access-scan-info arg)
        (catch 'exit
        (let ((list reftex-view-crossref-extra)
--- 86,92 ----
                (format reftex-find-index-entry-regexp-format
                        (regexp-quote key))
                3 nil nil)))
!      (t
        (reftex-access-scan-info arg)
        (catch 'exit
        (let ((list reftex-view-crossref-extra)
***************
*** 96,109 ****
                  action (nth 1 entry)
                  group (nth 2 entry))
            (when (string-match mre macro)
!             (setq dw (reftex-view-regexp-match 
                        (format action key) group nil nil))
              (throw 'exit t))))
        (error "Not on a crossref macro argument"))))
      (if (and (eq arg 2) (windowp dw)) (select-window dw))))
!      
  (defun reftex-view-cr-cite (arg key how)
!   ;; View crossreference of a ref cite.  HOW can have the values 
    ;; nil:         Show in another window.
    ;; echo:        Show one-line info in echo area.
    ;; tmp-window:  Show in small window and arrange for window to disappear.
--- 96,109 ----
                  action (nth 1 entry)
                  group (nth 2 entry))
            (when (string-match mre macro)
!             (setq dw (reftex-view-regexp-match
                        (format action key) group nil nil))
              (throw 'exit t))))
        (error "Not on a crossref macro argument"))))
      (if (and (eq arg 2) (windowp dw)) (select-window dw))))
! 
  (defun reftex-view-cr-cite (arg key how)
!   ;; View crossreference of a ref cite.  HOW can have the values
    ;; nil:         Show in another window.
    ;; echo:        Show one-line info in echo area.
    ;; tmp-window:  Show in small window and arrange for window to disappear.
***************
*** 113,119 ****
  
    (if (eq how 'tmp-window)
        ;; Remember the window configuration
!       (put 'reftex-auto-view-crossref 'last-window-conf 
           (current-window-configuration)))
  
    (let (files size item (pos (point)) (win (selected-window)) pop-win
--- 113,119 ----
  
    (if (eq how 'tmp-window)
        ;; Remember the window configuration
!       (put 'reftex-auto-view-crossref 'last-window-conf
           (current-window-configuration)))
  
    (let (files size item (pos (point)) (win (selected-window)) pop-win
***************
*** 129,135 ****
        (setq item t
            files (reftex-uniquify
                   (mapcar 'cdr
!                          (reftex-all-assq 
                            'thebib (symbol-value reftex-docstruct-symbol))))))
       (reftex-default-bibliography
        (setq item nil
--- 129,135 ----
        (setq item t
            files (reftex-uniquify
                   (mapcar 'cdr
!                          (reftex-all-assq
                            'thebib (symbol-value reftex-docstruct-symbol))))))
       (reftex-default-bibliography
        (setq item nil
***************
*** 168,184 ****
        (select-window pop-win)))))
  
  (defun reftex-view-cr-ref (arg label how)
!   ;; View crossreference of a ref macro.  HOW can have the values 
    ;; nil:         Show in another window.
    ;; echo:        Show one-line info in echo area.
    ;; tmp-window:  Show in small window and arrange for window to disappear.
  
    ;; Ensure access to scanning info
    (reftex-access-scan-info (or arg current-prefix-arg))
!   
    (if (eq how 'tmp-window)
        ;; Remember the window configuration
!       (put 'reftex-auto-view-crossref 'last-window-conf 
           (current-window-configuration)))
  
    (let* ((xr-data (assoc 'xr (symbol-value reftex-docstruct-symbol)))
--- 168,184 ----
        (select-window pop-win)))))
  
  (defun reftex-view-cr-ref (arg label how)
!   ;; View crossreference of a ref macro.  HOW can have the values
    ;; nil:         Show in another window.
    ;; echo:        Show one-line info in echo area.
    ;; tmp-window:  Show in small window and arrange for window to disappear.
  
    ;; Ensure access to scanning info
    (reftex-access-scan-info (or arg current-prefix-arg))
! 
    (if (eq how 'tmp-window)
        ;; Remember the window configuration
!       (put 'reftex-auto-view-crossref 'last-window-conf
           (current-window-configuration)))
  
    (let* ((xr-data (assoc 'xr (symbol-value reftex-docstruct-symbol)))
***************
*** 190,203 ****
        ;; Label is defined in external document
        (save-excursion
          (save-match-data
!           (set-buffer 
             (or (reftex-get-file-buffer-force
                  (cdr (assoc (match-string 1 label) (nth 1
                                                          xr-data))))
                 (error "Problem with external label %s" label))))
          (setq label (substring label (match-end 1)))
          (reftex-access-scan-info)
!         (setq entry 
                (assoc label (symbol-value reftex-docstruct-symbol)))))
      (if (eq how 'echo)
        ;; Display in echo area
--- 190,203 ----
        ;; Label is defined in external document
        (save-excursion
          (save-match-data
!           (set-buffer
             (or (reftex-get-file-buffer-force
                  (cdr (assoc (match-string 1 label) (nth 1
                                                          xr-data))))
                 (error "Problem with external label %s" label))))
          (setq label (substring label (match-end 1)))
          (reftex-access-scan-info)
!         (setq entry
                (assoc label (symbol-value reftex-docstruct-symbol)))))
      (if (eq how 'echo)
        ;; Display in echo area
***************
*** 243,249 ****
                                 reftex-mouse-view-crossref)))
         ;; Quick precheck if this might be a relevant spot
         ;; FIXME: Can fail with backslash in comment
!        (save-excursion  
         (search-backward "\\" nil t)
         (looking-at "\\\\[a-zA-Z]*\\(cite\\|ref\\|bibentry\\)"))
  
--- 243,249 ----
                                 reftex-mouse-view-crossref)))
         ;; Quick precheck if this might be a relevant spot
         ;; FIXME: Can fail with backslash in comment
!        (save-excursion
         (search-backward "\\" nil t)
         (looking-at "\\\\[a-zA-Z]*\\(cite\\|ref\\|bibentry\\)"))
  
***************
*** 261,267 ****
    (set-window-configuration (get 'reftex-auto-view-crossref 
'last-window-conf))
    (put 'reftex-auto-view-crossref 'last-window-conf nil)
    (remove-hook 'pre-command-hook 'reftex-restore-window-conf))
!                 
  (defun reftex-echo-ref (label entry docstruct)
    ;; Display crossref info in echo area.
    (cond
--- 261,267 ----
    (set-window-configuration (get 'reftex-auto-view-crossref 
'last-window-conf))
    (put 'reftex-auto-view-crossref 'last-window-conf nil)
    (remove-hook 'pre-command-hook 'reftex-restore-window-conf))
! 
  (defun reftex-echo-ref (label entry docstruct)
    ;; Display crossref info in echo area.
    (cond
***************
*** 292,305 ****
        (unless reftex-revisit-to-echo
        (setq files (reftex-visited-files files)))
  
!       (setq entry 
            (condition-case nil
                (save-excursion
                  (reftex-pop-to-bibtex-entry key files nil nil item t))
              (error
               (if (and files (= (length all-files) (length files)))
                   (message "cite: no such database entry: %s" key)
!                (message (substitute-command-keys 
                           (format reftex-no-info-message "cite"))))
               nil)))
        (when entry
--- 292,305 ----
        (unless reftex-revisit-to-echo
        (setq files (reftex-visited-files files)))
  
!       (setq entry
            (condition-case nil
                (save-excursion
                  (reftex-pop-to-bibtex-entry key files nil nil item t))
              (error
               (if (and files (= (length all-files) (length files)))
                   (message "cite: no such database entry: %s" key)
!                (message (substitute-command-keys
                           (format reftex-no-info-message "cite"))))
               nil)))
        (when entry
***************
*** 337,343 ****
          (if (featurep 'xemacs)
              (if reftex-use-itimer-in-xemacs
                  (start-itimer "RefTeX Idle Timer"
!                               'reftex-view-crossref-when-idle 
                                reftex-idle-time reftex-idle-time t)
                (add-hook 'post-command-hook 'reftex-start-itimer-once)
                t)
--- 337,343 ----
          (if (featurep 'xemacs)
              (if reftex-use-itimer-in-xemacs
                  (start-itimer "RefTeX Idle Timer"
!                               'reftex-view-crossref-when-idle
                                reftex-idle-time reftex-idle-time t)
                (add-hook 'post-command-hook 'reftex-start-itimer-once)
                t)
***************
*** 352,358 ****
        (not (itimer-live-p reftex-auto-view-crossref-timer))
        (setq reftex-auto-view-crossref-timer
              (start-itimer "RefTeX Idle Timer"
!                           'reftex-view-crossref-when-idle 
                            reftex-idle-time nil t))))
  
  (defun reftex-view-crossref-from-bibtex (&optional arg)
--- 352,358 ----
        (not (itimer-live-p reftex-auto-view-crossref-timer))
        (setq reftex-auto-view-crossref-timer
              (start-itimer "RefTeX Idle Timer"
!                           'reftex-view-crossref-when-idle
                            reftex-idle-time nil t))))
  
  (defun reftex-view-crossref-from-bibtex (&optional arg)
***************
*** 362,368 ****
  link to a document, call the function with with a prefix arg.
  Calling this function several times find successive citation locations."
    (interactive "P")
!   (when arg 
      ;; Break connection to reference buffer
      (put 'reftex-bibtex-view-cite-locations :ref-buffer nil))
    (let ((ref-buffer (get 'reftex-bibtex-view-cite-locations :ref-buffer)))
--- 362,368 ----
  link to a document, call the function with with a prefix arg.
  Calling this function several times find successive citation locations."
    (interactive "P")
!   (when arg
      ;; Break connection to reference buffer
      (put 'reftex-bibtex-view-cite-locations :ref-buffer nil))
    (let ((ref-buffer (get 'reftex-bibtex-view-cite-locations :ref-buffer)))
***************
*** 370,379 ****
      (unless ref-buffer
        (setq ref-buffer
            (save-excursion
!             (completing-read 
               "Reference buffer: "
               (delq nil
!                    (mapcar 
                      (lambda (b)
                        (set-buffer b)
                        (if reftex-mode (list (buffer-name b)) nil))
--- 370,379 ----
      (unless ref-buffer
        (setq ref-buffer
            (save-excursion
!             (completing-read
               "Reference buffer: "
               (delq nil
!                    (mapcar
                      (lambda (b)
                        (set-buffer b)
                        (if reftex-mode (list (buffer-name b)) nil))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]