emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] elpa 40c2c26 32/51: Allow for negative offsets in region backward


From: Tassilo Horn
Subject: [elpa] elpa 40c2c26 32/51: Allow for negative offsets in region backward search
Date: Sun, 22 May 2016 07:22:49 +0000 (UTC)

branch: elpa
commit 40c2c26c0be82fb9ae164db40c96efea50cd3d8f
Author: Mosè Giordano <address@hidden>
Commit: Mosè Giordano <address@hidden>

    Allow for negative offsets in region backward search
    
    * tex.el (TeX-source-correlate-handle-TeX-region): Use the same regexp
      used in `preview-parse-messages', that is also XEmacs compatible and
      allows for negative offsets.  This makes backward search work also
      when using `TeX-command-buffer' and `LaTeX-command-section'.  Reported
      by Qiang Yin.
---
 tex.el |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tex.el b/tex.el
index b85a72a..c946851 100644
--- a/tex.el
+++ b/tex.el
@@ -1838,7 +1838,9 @@ file and LINE to (+ LINE offset-of-region).  Else, return 
nil."
     (with-current-buffer (or (find-buffer-visiting file)
                             (find-file-noselect file))
       (goto-char 0)
-      (when (re-search-forward "!offset(\\([[:digit:]]+\\))" nil t)
+      ;; Same regexp used in `preview-parse-messages'.  XXX: XEmacs doesn't
+      ;; support regexp classes, so we can't use "[:digit:]" here.
+      (when (re-search-forward "!offset(\\([---0-9]+\\))" nil t)
        (let ((offset (string-to-int (match-string-no-properties 1))))
          (when TeX-region-orig-buffer
            (list (expand-file-name (buffer-file-name TeX-region-orig-buffer))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]