]> git.eshelyaron.com Git - emacs.git/commitdiff
2019-12-05 regexp lint fixes
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 6 Dec 2019 03:31:00 +0000 (19:31 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 6 Dec 2019 03:32:12 +0000 (19:32 -0800)
* lisp/org/org-agenda.el (org-agenda-filter):
Fix unescaped literal ‘+’ in regexp.  Reported by Mattias Engdegård in:
https://lists.gnu.org/r/emacs-devel/2019-12/msg00215.html
* lisp/org/org.el (org-clone-subtree-with-time-shift):
Fix a regexp typo that mishandled strings like ‘\1d’,
reported by the same emaikl.
* lisp/progmodes/verilog-mode.el (verilog-inject-inst):
Omit unnecessary ‘?’ in regexp.  Reported by Mattias Engdegård in:
https://lists.gnu.org/r/emacs-devel/2019-12/msg00217.html

lisp/org/org-agenda.el
lisp/org/org.el
lisp/progmodes/verilog-mode.el

index 7cb5cca34cdf4f3756dd3ef027a3ca12b3d6a85f..2404ca43dcb6d91c702eeff0786dff783e8e41a3 100644 (file)
@@ -7670,7 +7670,7 @@ the variable `org-agenda-auto-exclude-function'."
                       (if negate "Negative filter" "Filter")
                       " [+cat-tag<0:10-/regexp/]: ")
                      'org-agenda-filter-completion-function))
-          (keep (or (if (string-match "^+[-+]" f-string)
+          (keep (or (if (string-match "^\\+[+-]" f-string)
                         (progn (setq f-string (substring f-string 1)) t))
                     (equal strip-or-accumulate '(16))))
           (fc (if keep org-agenda-category-filter))
index b37beeb96a632b44c121ae1a8ffa2bbe693b0701..f25c53caaffa82365b61a88f1c928c2fa6b08e33 100644 (file)
@@ -7825,7 +7825,7 @@ with the original repeater."
                "")))                   ;No time shift
         (doshift
          (and (org-string-nw-p shift)
-              (or (string-match "\\`[ \t]*\\([\\+\\-]?[0-9]+\\)\\([dwmy]\\)[ \t]*\\'"
+              (or (string-match "\\`[ \t]*\\([+-]?[0-9]+\\)\\([dwmy]\\)[ \t]*\\'"
                                 shift)
                   (user-error "Invalid shift specification %s" shift)))))
     (goto-char end-of-tree)
index 6ec8d995c15f639a90fe4bbcbeed297d83ab35f3..01914aade5aaabb98ca082f68a4b0faea2181402 100644 (file)
@@ -10973,7 +10973,7 @@ shown) will make this into:
                (t
                 ;; Delete identical interconnect
                  (let ((case-fold-search nil))  ; So we don't convert upper-to-lower, etc
-                  (while (verilog-re-search-forward-quick "\\.\\s *\\([a-zA-Z0-9`_$]+\\)?\\s *(\\s *\\1\\s *)\\s *" end-pt t)
+                  (while (verilog-re-search-forward-quick "\\.\\s *\\([a-zA-Z0-9`_$]+\\)\\s *(\\s *\\1\\s *)\\s *" end-pt t)
                     (delete-region (match-beginning 0) (match-end 0))
                      (setq end-pt (- end-pt (- (match-end 0) (match-beginning 0))))  ; Keep it correct
                     (while (or (looking-at "[ \t\n\f,]+")