emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 4c93307: 2019-12-05 regexp lint fixes


From: Paul Eggert
Subject: master 4c93307: 2019-12-05 regexp lint fixes
Date: Thu, 5 Dec 2019 22:32:18 -0500 (EST)

branch: master
commit 4c933077157ba409d645f4649c8a3a8e534d53d5
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>

    2019-12-05 regexp lint fixes
    
    * 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         | 2 +-
 lisp/org/org.el                | 2 +-
 lisp/progmodes/verilog-mode.el | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el
index 7cb5cca..2404ca4 100644
--- a/lisp/org/org-agenda.el
+++ b/lisp/org/org-agenda.el
@@ -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))
diff --git a/lisp/org/org.el b/lisp/org/org.el
index b37beeb..f25c53c 100644
--- a/lisp/org/org.el
+++ b/lisp/org/org.el
@@ -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)
diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el
index 6ec8d99..01914aa 100644
--- a/lisp/progmodes/verilog-mode.el
+++ b/lisp/progmodes/verilog-mode.el
@@ -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,]+")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]