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-ref.el


From: Carsten Dominik
Subject: [Emacs-diffs] Changes to emacs/lisp/textmodes/reftex-ref.el
Date: Tue, 27 Aug 2002 05:54:41 -0400

Index: emacs/lisp/textmodes/reftex-ref.el
diff -c emacs/lisp/textmodes/reftex-ref.el:1.12 
emacs/lisp/textmodes/reftex-ref.el:1.13
*** emacs/lisp/textmodes/reftex-ref.el:1.12     Thu Jul 25 03:03:41 2002
--- emacs/lisp/textmodes/reftex-ref.el  Tue Aug 27 05:54:41 2002
***************
*** 421,427 ****
                   (reftex-offer-label-menu type)))
      (reftex-ensure-compiled-variables)
      (set-marker reftex-select-return-marker nil)
!     ;; If the first entry is the symbol 'concat, concat all all labels.
      ;; We keep the cdr of the first label for typekey etc information.
      (if (eq (car labels) 'concat)
        (setq labels (list (list (mapconcat 'car (cdr labels) ",")
--- 421,427 ----
                   (reftex-offer-label-menu type)))
      (reftex-ensure-compiled-variables)
      (set-marker reftex-select-return-marker nil)
!     ;; If the first entry is the symbol 'concat, concat all labels.
      ;; We keep the cdr of the first label for typekey etc information.
      (if (eq (car labels) 'concat)
        (setq labels (list (list (mapconcat 'car (cdr labels) ",")
***************
*** 801,805 ****
--- 801,837 ----
    (format "\\Fref{%s}" label))
  (defun reftex-format-fref (label def-fmt)
    (format "\\fref{%s}" label))
+ 
+ 
+ ;(defun reftex-goto-label ()
+ ;  (interactive)
+ ;  (reftex-access-scan-info)
+ ;  (let* ((docstruct (symbol-value reftex-docstruct-symbol))
+ ;      (label (completing-read "Label: " docstruct
+ ;                              (lambda (x) (stringp (car x))) t))
+ ;      (selection (assoc label docstruct)))
+ ;    (reftex-show-label-location selection t nil 'stay)
+ ;    (reftex-unhighlight 0)))
+ 
+ (defun reftex-goto-label (&optional other-window)
+   "Prompt for a label (with completion) and jump to the location of this 
label.
+ Optional prefix argument OTHER-WINDOW goes to the label in another window."
+   (interactive "P")
+   (reftex-access-scan-info)
+   (let* ((wcfg (current-window-configuration))
+        (docstruct (symbol-value reftex-docstruct-symbol))
+        (label (completing-read "Label: " docstruct
+                                (lambda (x) (stringp (car x))) t))
+        (selection (assoc label docstruct))
+        (where (progn
+                 (reftex-show-label-location selection t nil 'stay)
+                 (point-marker))))
+     (unless other-window
+       (set-window-configuration wcfg)
+       (switch-to-buffer (marker-buffer where))
+       (goto-char where))      
+     (reftex-unhighlight 0)))
+ 
+ 
  
  ;;; reftex-ref.el ends here




reply via email to

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