Function: reftex-tie-multifile-symbols

reftex-tie-multifile-symbols is a byte-compiled function defined in reftex.el.gz.

Signature

(reftex-tie-multifile-symbols)

Documentation

Tie the buffer-local symbols to globals connected with the master file.

If the symbols for the current master file do not exist, they are created.

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/reftex.el.gz
(defun reftex-tie-multifile-symbols ()
  "Tie the buffer-local symbols to globals connected with the master file.
If the symbols for the current master file do not exist, they are created."
  (let* ((master (file-truename (reftex-TeX-master-file)))
         (index (assoc master reftex-master-index-list))
         (symlist reftex-multifile-symbols)
         symbol symname newflag)
    ;; Find the correct index.
    (if index
        ;; Symbols do exist
        (setq index (cdr index))
      ;; Get a new index and add info to the alist.
      (setq index (reftex-next-multifile-index)
            newflag t)
      (push (cons master index) reftex-master-index-list))

    ;; Get/create symbols and tie them.
    (while symlist
      (setq symbol (car symlist)
            symlist (cdr symlist)
            symname (symbol-name symbol))
      (set symbol (intern (concat symname "-" (int-to-string index))))
      (put (symbol-value symbol) :master-index index)
      ;; Initialize if new symbols.
      (when newflag
        (set (symbol-value symbol) nil)
        (put (symbol-value symbol) 'reftex-index-macros-style '(default))
	(put (symbol-value symbol) 'reftex-ref-style-list
	     reftex-ref-style-default-list)))

    ;; Return t if the symbols did already exist, nil when we've made them.
    (not newflag)))