From: Stefan Monnier Date: Fri, 15 Jan 2016 21:59:21 +0000 (-0500) Subject: * xmltok.el: Mark the "sole --" rather than the comment opener X-Git-Tag: emacs-26.0.90~2816^2~16 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=05988c0d527de99d54266cc3ef0688899761ba26;p=emacs.git * xmltok.el: Mark the "sole --" rather than the comment opener * lisp/nxml/xmltok.el (xmltok-scan-after-comment-open): Put the error marker on the "sole --" rather than on the comment opener. --- diff --git a/lisp/nxml/xmltok.el b/lisp/nxml/xmltok.el index 8fc66c99a45..93d47c195c0 100644 --- a/lisp/nxml/xmltok.el +++ b/lisp/nxml/xmltok.el @@ -262,11 +262,10 @@ and VALUE-END, otherwise a STRING giving the value." (vector message start end)) (defun xmltok-add-error (message &optional start end) - (setq xmltok-errors - (cons (xmltok-make-error message - (or start xmltok-start) - (or end (point))) - xmltok-errors))) + (push (xmltok-make-error message + (or start xmltok-start) + (or end (point))) + xmltok-errors)) (defun xmltok-forward () (setq xmltok-start (point)) @@ -739,19 +738,11 @@ Return the type of the token." (setq xmltok-type 'processing-instruction)) (defun xmltok-scan-after-comment-open () - (let ((found-- (search-forward "--" nil 'move))) - (setq xmltok-type - (cond ((or (eq (char-after) ?>) (not found--)) - (goto-char (1+ (point))) - 'comment) - (t - ;; just include the