branch: externals/auctex commit bde89b987c556bad3462cd4ec3734b5f0d6b4206 Author: Arash Esbati <ar...@gnu.org> Commit: Arash Esbati <ar...@gnu.org>
* 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