1190 |
(forward-sexp 1)) |
(forward-sexp 1)) |
1191 |
;; Now check that like matches like. |
;; Now check that like matches like. |
1192 |
(goto-char start) |
(goto-char start) |
1193 |
(while (progn (skip-syntax-forward "^(") |
(while (re-search-forward "\\s(" nil t) |
1194 |
(not (eobp))) |
(save-excursion |
1195 |
(let ((match (matching-paren (following-char)))) |
(let ((pos (match-beginning 0))) |
1196 |
(save-excursion |
(goto-char pos) |
1197 |
(forward-sexp 1) |
(forward-sexp 1) |
1198 |
(or (= (preceding-char) match) |
(or (eq (preceding-char) (cdr (syntax-after pos))) |
1199 |
(error "Mismatched parentheses")))) |
(eq (char-after pos) (cdr (syntax-after (1- (point))))) |
1200 |
(forward-char 1))) |
(error "Mismatched parentheses")))))) |
1201 |
(error |
(error |
1202 |
(skip-syntax-forward " .>") |
(skip-syntax-forward " .>") |
1203 |
(setq failure-point (point))))) |
(setq failure-point (point))))) |
1693 |
(let* ((file (or tex-main-file |
(let* ((file (or tex-main-file |
1694 |
;; Compatibility with AUCTeX. |
;; Compatibility with AUCTeX. |
1695 |
(with-no-warnings |
(with-no-warnings |
1696 |
(when (and (boundp 'TeX-master) (stringp TeX-master)) |
(when (boundp 'TeX-master) |
1697 |
(make-local-variable 'tex-main-file) |
(cond ((stringp TeX-master) |
1698 |
(setq tex-main-file TeX-master))) |
(make-local-variable 'tex-main-file) |
1699 |
|
(setq tex-main-file TeX-master)) |
1700 |
|
((and (eq TeX-master t) buffer-file-name) |
1701 |
|
(file-relative-name buffer-file-name))))) |
1702 |
;; Try to guess the main file. |
;; Try to guess the main file. |
1703 |
(if (not buffer-file-name) |
(if (not buffer-file-name) |
1704 |
(error "Buffer is not associated with any file") |
(error "Buffer is not associated with any file") |