Commit e71f1dda authored by Paul Eggert's avatar Paul Eggert

Fix more regexp oddities

Problems reported by Mattias Engdegård in:
* lisp/progmodes/sh-script.el (sh-get-indent-info):
Reorder skip-chars-forward arg so that it does not look like a regexp.
* lisp/progmodes/verilog-mode.el (verilog-sk-define-signal):
Fix typo: the string is not a regexp.
* lisp/vc/log-edit.el (log-edit-goto-eoh): Fix typo: stray ‘:’.
* lisp/xml.el (xml-parse-dtd): Avoid ‘-’ right after char class.
parent f28c2090
Pipeline #1191 failed with stage
in 49 minutes and 26 seconds
......@@ -2905,8 +2905,7 @@ STRING This is ignored for the purposes of calculating
(setq align-point (point))))
(or (bobp)
(forward-char -1))
;; FIXME: This charset looks too much like a regexp. --Stef
(skip-chars-forward "[a-z0-9]*?")
(skip-chars-forward "*0-9?[]a-z")
((string-match "[])}]" x)
(setq x (sh-safe-forward-sexp -1))
......@@ -14263,7 +14263,7 @@ and the case items."
(defun verilog-sk-define-signal ()
"Insert a definition of signal under point at top of module."
(interactive "*")
(let* ((sig-re "[a-zA-Z0-9_]*")
(let* ((sig-re "a-zA-Z0-9_")
(v1 (buffer-substring
(skip-chars-backward sig-re)
......@@ -350,7 +350,7 @@ The first subexpression is the actual text of the field.")
(defun log-edit-goto-eoh () ;FIXME: Almost rfc822-goto-eoh!
(goto-char (point-min))
(when (re-search-forward
"^\\([^[:alpha:]]\\|[[:alnum:]-]+[^[:alnum:]-:]\\)" nil 'move)
"^\\([^[:alpha:]]\\|[[:alnum:]-]+[^[:alnum:]-]\\)" nil 'move)
(goto-char (match-beginning 0))))
(defun log-edit--match-first-line (limit)
......@@ -718,10 +718,10 @@ This follows the rule [28] in the XML specifications."
(cond ((looking-at "PUBLIC\\s-+")
(goto-char (match-end 0))
(unless (or (re-search-forward
nil t)
nil t))
(error "XML: Missing Public ID"))
(let ((pubid (match-string-no-properties 1)))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment