|
@@ -2916,8 +2916,11 @@ Assume point is at the beginning of the LaTeX fragment."
|
|
|
(if (eq (char-after (1+ (point))) ?$)
|
|
|
(search-forward "$$" nil t 2)
|
|
|
(and (not (eq (char-before) ?$))
|
|
|
- (looking-at "\\$[^ \t\n,;.$]\\(?:[^$]*?[^ \t\n,.$]\\)?\\$\\([- \t.,?;:'\")]\\|$\\)")
|
|
|
- (match-beginning 1)))
|
|
|
+ (search-forward "$" nil t 2)
|
|
|
+ (not (memq (char-before (match-beginning 0))
|
|
|
+ '(?\s ?\t ?\n ?, ?.)))
|
|
|
+ (looking-at "\\([- \t.,?;:'\"]\\|$\\)")
|
|
|
+ (point)))
|
|
|
(case (char-after (1+ (point)))
|
|
|
(?\( (search-forward "\\)" nil t))
|
|
|
(?\[ (search-forward "\\]" nil t))
|