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

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

[elpa] externals/auctex bde89b9 27/57: * latex.el (LaTeX-env-label-as-ke


From: Tassilo Horn
Subject: [elpa] externals/auctex bde89b9 27/57: * latex.el (LaTeX-env-label-as-keyval): Use `buffer-substring-no-properties'.
Date: Tue, 25 Jul 2017 14:02:31 -0400 (EDT)

branch: externals/auctex
commit bde89b987c556bad3462cd4ec3734b5f0d6b4206
Author: Arash Esbati <address@hidden>
Commit: Arash Esbati <address@hidden>

    * latex.el (LaTeX-env-label-as-keyval): Use 
`buffer-substring-no-properties'.
---
 latex.el | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/latex.el b/latex.el
index 80bdab6..d0a956e 100644
--- a/latex.el
+++ b/latex.el
@@ -1275,14 +1275,12 @@ out."
       (forward-sexp)
       (set-marker opt-end (1- (point))))
     ;; If keyword argument is given and keyvals argument is not given,
-    ;; parse the optional argument and put it into keyvals; the regexp
-    ;; takes care of multi-line arguments
+    ;; parse the optional argument and put it into keyvals
     (when (and keyword
               (marker-position opt-start)
               (not keyvals))
-      (goto-char (1+ opt-start))
-      (re-search-forward "\\(.*\\([\n\r].*\\)*\\)" opt-end t)
-      (setq keyvals (match-string-no-properties 0)))
+      (setq keyvals (buffer-substring-no-properties
+                    (1+ opt-start) opt-end)))
     ;; If keyword is given, only insert a label when keyword is found
     ;; inside the keyvals.  If keyword is nil, then insert a label
     ;; anyways



reply via email to

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