branch: main commit 4c2c27d7acfa9221313a6666e7c1b112a3a1e227 Author: Stefan Monnier <monn...@iro.umontreal.ca> Commit: Stefan Monnier <monn...@iro.umontreal.ca>
Fix unescaped character literals * font-latex.el (font-latex-command-with-args-opt-arg-delims) * tex-fold.el (TeX-fold-expand-spec): Escape [ and ] character literals --- font-latex.el | 2 +- tex-fold.el | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/font-latex.el b/font-latex.el index 47b6607d..a397b4b9 100644 --- a/font-latex.el +++ b/font-latex.el @@ -1588,7 +1588,7 @@ XEmacs does not do this at the time of this writing." Set this to nil if verification of command syntax is unwanted.") (defvar font-latex-command-with-args-opt-arg-delims - '((?[ . ?]) (?< . ?>) (?\( . ?\))) + '((?\[ . ?\]) (?< . ?>) (?\( . ?\))) "List character pairs used as delimiters for optional arguments.") (defvar font-latex-syntax-error-modes '(latex-mode) diff --git a/tex-fold.el b/tex-fold.el index cf4284ea..6188147f 100644 --- a/tex-fold.el +++ b/tex-fold.el @@ -1,6 +1,6 @@ ;;; tex-fold.el --- Fold TeX macros. -;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011-2012, 2014 +;; Copyright (C) 2004-2008, 2011-2012, 2014, 2017 ;; Free Software Foundation, Inc. ;; Author: Ralf Angeli <ang...@caeruleus.net> @@ -765,7 +765,7 @@ Return non-nil if a removal happened, nil otherwise." "Expand instances of {<num>}, [<num>], <<num>>, and (<num>). Replace them with the respective macro argument." (let ((spec-list (split-string spec "||")) - (delims '((?{ . ?}) (?[ . ?]) (?< . ?>) (?\( . ?\)))) + (delims '((?\{ . ?\}) (?\[ . ?\]) (?< . ?>) (?\( . ?\)))) index success) (catch 'success ;; Iterate over alternatives.