• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/emacs-92/emacs/lisp/textmodes/

Lines Matching +defs:file +defs:regexp

10 ;; This file is part of GNU Emacs.
23 ;; along with GNU Emacs; see the file COPYING. If not, write to the
99 by a call to `reftex-add-index-macros', typically from an AUCTeX style file.
282 (defvar reftex-last-index-file nil
283 "Stores the file name from which `reftex-display-index' was called.")
354 (let* ((file (nth 3 data))
357 (re (regexp-quote literal))
361 (reftex-get-buffer-visiting file))
363 (reftex-get-file-buffer-force file nil))
397 (master (reftex-TeX-master-file))
398 (calling-file (buffer-file-name))
435 (set (make-local-variable 'reftex-last-index-file) calling-file)
454 " index-tag (abbreviate-file-name master)
705 "Regenerate the *Index* buffer after reparsing file of section at point."
711 (file (nth 3 data))
713 (if (not file)
714 (error "Don't know which file to rescan. Try `C-u r'")
715 (switch-to-buffer (reftex-get-file-buffer-force file))
726 (reftex-get-file-buffer-force reftex-last-index-file))
737 (reftex-get-file-buffer-force reftex-last-index-file))
746 (reftex-get-file-buffer-force reftex-last-index-file))
807 ;; Visit the tex file corresponding to the index entry on the current line.
849 (boa (if (string-match (regexp-quote (concat "{" arg "}")) context)
969 (concat (regexp-quote (car reftex-index-special-chars)) "\\'")
972 (if (string-match (regexp-quote key) old)
986 (regexp-quote (nth 0 reftex-index-special-chars))
1017 (set-buffer (get-file-buffer (nth 3 data)))
1019 (unless (looking-at (regexp-quote old))
1024 (when (and (re-search-forward (reftex-everything-regexp) nil t)
1027 (setq info (reftex-index-info-safe buffer-file-name)))
1158 (defconst reftex-index-phrases-comment-regexp "^[ \t]*%.*"
1160 (defconst reftex-index-phrases-macrodef-regexp
1163 ;(defconst reftex-index-phrases-macrodef-regexp
1180 "List of document files relevant for the phrases file.")
1208 (let* ((master (reftex-TeX-master-file))
1209 (name (concat (file-name-sans-extension master)
1210 reftex-index-phrase-file-extension)))
1211 (find-file name)
1231 (file-name-nondirectory master)))
1236 (while (re-search-forward reftex-index-phrases-macrodef-regexp nil t)
1239 (if (looking-at reftex-index-phrases-comment-regexp)
1251 (file-name-nondirectory (reftex-index-phrase-tex-master))))
1269 "Return the name of the master file associated with a phrase buffer."
1273 ;; We have a local variable which tells us which file to use
1274 (expand-file-name TeX-master dir)
1276 (concat (file-name-sans-extension (buffer-file-name)) ".tex")))
1288 (defvar reftex-index-phrases-restrict-file nil)
1330 (cons reftex-index-phrases-comment-regexp 'font-lock-comment-face)
1331 (list reftex-index-phrases-macrodef-regexp
1378 (cond ((looking-at reftex-index-phrases-comment-regexp)
1382 ((looking-at reftex-index-phrases-macrodef-regexp)
1396 (cond ((and (stringp reftex-index-phrases-restrict-file)
1397 (file-regular-p reftex-index-phrases-restrict-file))
1398 (list reftex-index-phrases-restrict-file))
1399 ((stringp reftex-index-phrases-restrict-file)
1400 (error "Invalid restriction file %s"
1401 reftex-index-phrases-restrict-file))
1448 "Parse the header of a phrases file to extract the macro definitions.
1455 ;; Get the file list
1457 (setq buf (reftex-get-file-buffer-force master))
1458 (unless buf (error "Master file %s not found" master))
1467 (while (re-search-forward reftex-index-phrases-macrodef-regexp nil t)
1475 (error "No valid MACRO DEFINITION line in %s file (make sure to use TAB separators)" reftex-index-phrase-file-extension))
1488 (reftex-index-phrases-restrict-file (buffer-file-name)))
1511 (concat "^\\(\\S-*\\)\t\\(" (regexp-quote text)
1566 reftex-index-phrases-logical-or-regexp))
1575 (re (reftex-index-make-phrase-regexp phrase as-words t))
1583 file files buf)
1596 (while (setq file (pop files))
1597 (setq buf (reftex-get-file-buffer-force file))
1627 "LaTeX file")))
1704 (re-search-backward (concat "^" (regexp-quote line) "$") nil t))
1741 (defun reftex-index-make-phrase-regexp (phrase &optional
1743 "Return a regexp matching PHRASE, even if distributed over lines.
1752 (mapconcat (lambda (w) (regexp-quote
1766 "Return a regexp which matches variations of PHRASE (with additional space).
1767 When SUB ins non-nil, the regexp will also match when PHRASE is a subphrase
1768 of another phrase. The regexp works lonly in the phrase buffer."
1770 (mapconcat 'regexp-quote (split-string phrase) " +")
1778 reftex-index-phrases-logical-and-regexp)))
1789 (file))
1793 (switch-to-buffer-other-window (reftex-get-file-buffer-force
1796 (while (setq file (pop files))
1797 (switch-to-buffer (reftex-get-file-buffer-force file))
1800 (unless (stringp reftex-index-phrases-restrict-file)
1812 ! Replace this and all further matches in this file
1813 q / Q Skip match, start next file / start next phrase
1831 (let* ((re (reftex-index-make-phrase-regexp phrase as-words 'allow-newline))
1835 reftex-index-phrases-logical-or-regexp))
1890 ;; Stop this one in this file