Function: reftex-label-info-update

reftex-label-info-update is an autoloaded and byte-compiled function defined in reftex-ref.el.gz.

Signature

(reftex-label-info-update CELL)

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/reftex-ref.el.gz
;;;###autoload
(defun reftex-label-info-update (cell)
  ;; Update information about just one label in a different file.
  ;; CELL contains the old info list
  (let* ((label   (nth 0 cell))
         (typekey (nth 1 cell))
         ;; (text    (nth 2 cell))
         (file    (nth 3 cell))
         (comment (nth 4 cell))
         (note    (nth 5 cell))
         (buf (reftex-get-file-buffer-force
               file (not (eq t reftex-keep-temporary-buffers)))))
    (if (not buf)
        (list label typekey "" file comment "LOST LABEL.  RESCAN TO FIX.")
      (with-current-buffer buf
        (save-restriction
          (widen)
          (goto-char 1)

          (if (or (re-search-forward
                   (format reftex-find-label-regexp-format
                           (regexp-quote label))
                   nil t)
                  (re-search-forward
                   (format reftex-find-label-regexp-format2
                           (regexp-quote label))
                   nil t))

              (progn
                (backward-char 1)
                (append (reftex-label-info label file) (list note)))
            (list label typekey "" file "LOST LABEL.  RESCAN TO FIX.")))))))