]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix more regexp oddities
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 7 Apr 2019 09:44:37 +0000 (02:44 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 7 Apr 2019 09:45:33 +0000 (02:45 -0700)
Problems reported by Mattias Engdegård in:
https://lists.gnu.org/archive/html/emacs-devel/2019-04/msg00178.html
* 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.

lisp/progmodes/sh-script.el
lisp/progmodes/verilog-mode.el
lisp/vc/log-edit.el
lisp/xml.el

index dd3a6fa411e045137d792742c99646d9b3f005cd..853a3500ee1e0d8c18995f9d97ae57bb73eefd09 100644 (file)
@@ -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))
index 7b9c3921fbac2951cca97f0a1a4be0d3f77e1b92..916594bdde0bd028164c66e3b1a34cf2b2abea17 100644 (file)
@@ -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
               (save-excursion
                 (skip-chars-backward sig-re)
index 8bd1bbddb78b7e5f0c9c296ed43581c5b426ad65..42710dd8dc91a81d679b0fea4a15e8d09443255e 100644 (file)
@@ -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)
index 2337952f0640a081695af1331bc2731463cb150c..b5b923f863e56a47f5bfda4281f7672bdb182f16 100644 (file)
@@ -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
-                       "\\=\"\\([[:space:][:alnum:]-'()+,./:=?;!*#@$_%]*\\)\""
+                       "\\=\"\\([[:space:][:alnum:]'()+,./:=?;!*#@$_%-]*\\)\""
                        nil t)
                       (re-search-forward
-                       "\\='\\([[:space:][:alnum:]-()+,./:=?;!*#@$_%]*\\)'"
+                       "\\='\\([[:space:][:alnum:]()+,./:=?;!*#@$_%-]*\\)'"
                        nil t))
             (error "XML: Missing Public ID"))
           (let ((pubid (match-string-no-properties 1)))