]> git.eshelyaron.com Git - emacs.git/commitdiff
Remove subsumed repetitions in regexps
authorMattias Engdegård <mattiase@acm.org>
Thu, 20 Feb 2020 14:45:44 +0000 (15:45 +0100)
committerMattias Engdegård <mattiase@acm.org>
Thu, 20 Feb 2020 15:05:18 +0000 (16:05 +0100)
Make regexps smaller and faster by removing terms that are superfluous
by virtue of standing next to another term that matches more.  See
https://lists.gnu.org/archive/html/emacs-devel/2020-01/msg00949.html
for details.

* lisp/bs.el (bs--make-header-match-string):
* lisp/gnus/deuglify.el (gnus-outlook-repair-attribution-block):
* lisp/gnus/message.el (message-subject-trailing-was-ask-regexp)
(message-subject-trailing-was-regexp):
* lisp/informat.el (Info-validate):
* lisp/net/browse-url.el (browse-url-button-regexp):
* lisp/net/rcirc.el (rcirc-url-regexp):
* lisp/org/ob-core.el (org-babel-remove-result):
* lisp/org/ob-fortran.el (org-babel-fortran-ensure-main-wrap):
* lisp/org/org-capture.el (org-capture-set-target-location):
* lisp/org/org-table.el (org-table-expand-lhs-ranges):
* lisp/org/org.el (org-maybe-keyword-time-regexp, org-ts-regexp)
(org-ts-regexp-inactive, org-ts-regexp-both):
* lisp/play/gametree.el (gametree-hack-file-layout):
* lisp/progmodes/cc-mode.el (c-Java-defun-prompt-regexp):
* lisp/progmodes/idlw-shell.el (idlwave-shell-halting-error):
* lisp/progmodes/ruby-mode.el (ruby-mode-set-encoding):
* lisp/progmodes/verilog-mode.el (verilog-error-font-lock-keywords)
(verilog-verilint-off, verilog-case-indent-level)
(verilog-within-translate-off, verilog-start-translate-off)
(verilog-back-to-start-translate-off, verilog-end-translate-off)
(verilog-expand-dirnames):
* lisp/term.el (term-control-seq-regexp):
* lisp/textmodes/reftex-vars.el (featurep):
* lisp/url/url-gw.el (url-open-telnet):
* lisp/vc/ediff-ptch.el (ediff-context-diff-label-regexp):
* lisp/vc/pcvs-parse.el (cvs-parse-status):
* test/src/regex-emacs-tests.el (regex-tests-PCRE):
Remove subsumed repetitions.
* lisp/progmodes/sh-script.el (sh-syntax-propertize-function):
Simplify repetition of a repetition.

23 files changed:
lisp/bs.el
lisp/gnus/deuglify.el
lisp/gnus/message.el
lisp/informat.el
lisp/net/browse-url.el
lisp/net/rcirc.el
lisp/org/ob-core.el
lisp/org/ob-fortran.el
lisp/org/org-capture.el
lisp/org/org-table.el
lisp/org/org.el
lisp/play/gametree.el
lisp/progmodes/cc-mode.el
lisp/progmodes/idlw-shell.el
lisp/progmodes/ruby-mode.el
lisp/progmodes/sh-script.el
lisp/progmodes/verilog-mode.el
lisp/term.el
lisp/textmodes/reftex-vars.el
lisp/url/url-gw.el
lisp/vc/ediff-ptch.el
lisp/vc/pcvs-parse.el
test/src/regex-emacs-tests.el

index f5cb93b5169f36671b09e1f2ff7de93afdb28a2e..337d22ecf837f7381c9cd40e784e773c6f01930d 100644 (file)
@@ -173,7 +173,12 @@ return a string representing the column's value."
 
 (defun bs--make-header-match-string ()
   "Return a regexp matching the first line of a Buffer Selection Menu buffer."
-  (concat "^\\(" (mapconcat #'car bs-attributes-list " *") " *$\\)"))
+  (concat "^\\("
+          (apply #'concat (mapcan (lambda (e)
+                                    (and (not (equal (car e) ""))
+                                         (list " *" (car e))))
+                                  bs-attributes-list))
+          " *$\\)"))
 
 ;; Font-Lock-Settings
 (defvar bs-mode-font-lock-keywords
index 0ce4a7d29289902d9d775a9e81499aa272678214..647f643c962eb91f48c93a6f285f4c10315f390b 100644 (file)
@@ -403,9 +403,9 @@ NODISPLAY is non-nil, don't redisplay the article buffer."
     (gnus-with-article-buffer
       (article-goto-body)
       (when (re-search-forward
-            (concat "^[" cite-marks " \t]*--* ?[^-]+ [^-]+ ?--*\\s *\n"
+            (concat "^[" cite-marks " \t]*--*[^-]+ [^-]+--*\\s *\n"
                     "[^\n:]+:[ \t]*\\([^\n]+\\)\n"
-                    "\\([^\n:]+:[ \t]*[^\n]+\n\\)+")
+                    "\\([^\n:]+:[^\n]+\n\\)+")
             nil t)
        (gnus-kill-all-overlays)
        (replace-match "\\1 wrote:\n")
index 3abeec7e2f23e68c3d59c4ee6f7951ea70fc5126..f1ace0eeb2ea24d6b530a7896722cff7e15143f1 100644 (file)
@@ -322,7 +322,7 @@ used."
   :group 'message-various)
 
 (defcustom message-subject-trailing-was-ask-regexp
-  "[ \t]*\\([[(]+[Ww][Aa][Ss]:?[ \t]*.*[])]+\\)"
+  "[ \t]*\\([[(]+[Ww][Aa][Ss].*[])]+\\)"
   "Regexp matching \"(was: <old subject>)\" in the subject line.
 
 The function `message-strip-subject-trailing-was' uses this regexp if
@@ -337,7 +337,7 @@ It is okay to create some false positives here, as the user is asked."
   :type 'regexp)
 
 (defcustom message-subject-trailing-was-regexp
-  "[ \t]*\\((*[Ww][Aa][Ss]:[ \t]*.*)\\)"
+  "[ \t]*\\((*[Ww][Aa][Ss]:.*)\\)"
   "Regexp matching \"(was: <old subject>)\" in the subject line.
 
 If `message-subject-trailing-was-query' is set to t, the subject is
index 9873f66f2155688d24ac3d6e07ec37131b72678e..7750ab008986479f5f1245623ead9b3f95b593da 100644 (file)
@@ -337,7 +337,7 @@ Check that every node pointer points to an existing node."
                                                     (point))))
                         (Info-extract-menu-node-name))))
                  (goto-char (point-min))
-                 (while (re-search-forward "\\*note[ \n]*[^:\t]*:" nil t)
+                 (while (re-search-forward "\\*note\\>[^:\t]*:" nil t)
                    (goto-char (+ (match-beginning 0) 5))
                    (skip-chars-forward " \n")
                    (Info-validate-node-name
index 25aabf6d61dc8849956e28552d8a93779c78c601..7aad44b287687903be7973a4d463f004b3a7570f 100644 (file)
@@ -216,7 +216,7 @@ be used instead."
       "\\(?:"
       ;; Match paired parentheses, e.g. in Wikipedia URLs:
       ;; http://thread.gmane.org/47B4E3B2.3050402@gmail.com
-      "[" chars punct "]+" "(" "[" chars punct "]+" "[" chars "]*)"
+      "[" chars punct "]+" "(" "[" chars punct "]+" ")"
       "\\(?:" "[" chars punct "]+" "[" chars "]" "\\)?"
       "\\|"
       "[" chars punct "]+" "[" chars "]"
index ad06d31cf9a63a14eb857ac2f7a30eb5884c8aa2..a223416690327a8f09aa51b0f05318e914c69f0d 100644 (file)
@@ -2421,7 +2421,7 @@ keywords when no KEYWORD is given."
         (concat
          "\\(?:"
          ;; Match paired parentheses, e.g. in Wikipedia URLs:
-         "[" chars punct "]+" "(" "[" chars punct "]+" "[" chars "]*)" "[" chars "]"
+         "[" chars punct "]+" "(" "[" chars punct "]+" ")" "[" chars "]"
          "\\|"
          "[" chars punct     "]+" "[" chars "]"
          "\\)"))
index 651561a20186468306d70a3ec3c50db522c3de04..a5ad97a468b8d78484b72bfa0f08b78665eee31a 100644 (file)
@@ -2437,7 +2437,7 @@ INFO may provide the values of these header arguments (in the
     (when location
       (save-excursion
         (goto-char location)
-       (when (looking-at (concat org-babel-result-regexp ".*$"))
+       (when (looking-at org-babel-result-regexp)
          (delete-region
           (if keep-keyword (line-beginning-position 2)
             (save-excursion
index 154465f28e192d35bd60af25694a8fd185b2c0e9..149058f05f4bb1ce6d87f6d91cc56a2ad2e9fc3a 100644 (file)
@@ -106,7 +106,7 @@ its header arguments."
 
 (defun org-babel-fortran-ensure-main-wrap (body params)
   "Wrap body in a \"program ... end program\" block if none exists."
-  (if (string-match "^[ \t]*program[ \t]*.*" (capitalize body))
+  (if (string-match "^[ \t]*program\\>" (capitalize body))
       (let ((vars (org-babel--get-vars params)))
        (when vars (error "Cannot use :vars if `program' statement is present"))
        body)
index 003cbef1fdfbe36174d3876f9b5a45f15738f62c..ace5127017585a3e435449265ea5b6dc3251feca 100644 (file)
@@ -1021,7 +1021,7 @@ Store them in the capture property list."
                         (apply #'encode-time 0 0
                                org-extend-today-until
                                (cl-cdddr (decode-time prompt-time))))
-                       ((string-match "\\([^ ]+\\)--?[^ ]+[ ]+\\(.*\\)"
+                       ((string-match "\\([^ ]+\\)-[^ ]+[ ]+\\(.*\\)"
                                       org-read-date-final-answer)
                         ;; Replace any time range by its start.
                         (apply #'encode-time
index 469e01be5d2c25439580f4b85e7f7924ba708ea0..98702feb375356b6cc7af603355165bf431103fc 100644 (file)
@@ -3099,7 +3099,7 @@ function assumes the table is already analyzed (i.e., using
       (let ((lhs (car e))
            (rhs (cdr e)))
        (cond
-        ((string-match-p "\\`@-?[-+0-9]+\\$-?[0-9]+\\'" lhs)
+        ((string-match-p "\\`@[-+0-9]+\\$-?[0-9]+\\'" lhs)
          ;; This just refers to one fixed field.
          (push e res))
         ((string-match-p "\\`[a-zA-Z][_a-zA-Z0-9]*\\'" lhs)
index e8e1ef99f26a192a6ceb12fc1c9319ab6be7b54b..52b72817650833efc7d433d943acc422ae4695e1 100644 (file)
@@ -460,7 +460,7 @@ Matched keyword is in group 1.")
                 org-clock-string)
           t)
          "\\)?"
-         " *\\([[<][0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} ?[^]\r\n>]*?[]>]"
+         " *\\([[<][0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}[^]\r\n>]*[]>]"
          "\\|"
          "<%%([^\r\n>]*>\\)")
   "Matches a timestamp, possibly preceded by a keyword.")
@@ -564,14 +564,14 @@ Effort estimates given in this property need to have the format H:MM.")
 
 ;;;; Timestamp
 
-(defconst org-ts-regexp "<\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} ?[^\r\n>]*?\\)>"
+(defconst org-ts-regexp "<\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}[^\r\n>]*\\)>"
   "Regular expression for fast time stamp matching.")
 
 (defconst org-ts-regexp-inactive
-  "\\[\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} ?[^\r\n>]*?\\)\\]"
+  "\\[\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}[^\r\n>]*\\)\\]"
   "Regular expression for fast inactive time stamp matching.")
 
-(defconst org-ts-regexp-both "[[<]\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} ?[^]\r\n>]*?\\)[]>]"
+(defconst org-ts-regexp-both "[[<]\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}[^]\r\n>]*\\)[]>]"
   "Regular expression for fast time stamp matching.")
 
 (defconst org-ts-regexp0
index aa99b5532447ac08cee880bc238fd9cee67cdd01..ba74afce298fa4f83c85daede14824ed55a5a3c3 100644 (file)
@@ -324,7 +324,7 @@ This value is simply the outline heading level of the current line."
 (defun gametree-hack-file-layout ()
   (save-excursion
     (goto-char (point-min))
-    (if (looking-at "[^\n]*-*-[^\n]*gametree-local-layout: \\([^;\n]*\\);")
+    (if (looking-at "[^\n]*-[^\n]*gametree-local-layout: \\([^;\n]*\\);")
         (progn
           (goto-char (match-beginning 1))
           (delete-region (point) (match-end 1))
index 7496684d9390d73a1da1431e0777b104a5002d2c..9c62b2bb06595f3f773b14f56bd13917613f514d 100644 (file)
@@ -2671,7 +2671,7 @@ Key bindings:
 ;; since it's practically impossible to write a regexp that reliably
 ;; matches such a construct.  Other tools are necessary.
 (defconst c-Java-defun-prompt-regexp
-  "^[ \t]*\\(\\(\\(public\\|protected\\|private\\|const\\|abstract\\|synchronized\\|final\\|static\\|threadsafe\\|transient\\|native\\|volatile\\)\\s-+\\)*\\(\\(\\([[a-zA-Z][][_$.a-zA-Z0-9]*[][_$.a-zA-Z0-9]+\\|[[a-zA-Z]\\)\\s-*\\)\\s-+\\)\\)?\\(\\([[a-zA-Z][][_$.a-zA-Z0-9]*\\s-+\\)\\s-*\\)?\\([_a-zA-Z][^][ \t:;.,{}()\^?=]*\\|\\([_$a-zA-Z][_$.a-zA-Z0-9]*\\)\\)\\s-*\\(([^);{}]*)\\)?\\([] \t]*\\)\\(\\s-*\\<throws\\>\\s-*\\(\\([_$a-zA-Z][_$.a-zA-Z0-9]*\\)[, \t\n\r\f\v]*\\)+\\)?\\s-*")
+  "^[ \t]*\\(\\(\\(public\\|protected\\|private\\|const\\|abstract\\|synchronized\\|final\\|static\\|threadsafe\\|transient\\|native\\|volatile\\)\\s-+\\)*\\(\\(\\([[a-zA-Z][][_$.a-zA-Z0-9]+\\|[[a-zA-Z]\\)\\s-*\\)\\s-+\\)\\)?\\(\\([[a-zA-Z][][_$.a-zA-Z0-9]*\\s-+\\)\\s-*\\)?\\([_a-zA-Z][^][ \t:;.,{}()\^?=]*\\|\\([_$a-zA-Z][_$.a-zA-Z0-9]*\\)\\)\\s-*\\(([^);{}]*)\\)?\\([] \t]*\\)\\(\\s-*\\<throws\\>\\s-*\\(\\([_$a-zA-Z][_$.a-zA-Z0-9]*\\)[, \t\n\r\f\v]*\\)+\\)?\\s-*")
 
 (easy-menu-define c-java-menu java-mode-map "Java Mode Commands"
                  (cons "Java" (c-lang-const c-mode-menu java)))
index dba70cb282121d6364a4e1c752983744de07ba22..6770fbe8abc7aade06b276cc9b01e4bfe65ea139 100644 (file)
@@ -1598,7 +1598,7 @@ number.")
   "A regular expression to match any IDL error.")
 
 (defvar idlwave-shell-halting-error
-  "^% .*\n\\([^%].*\n\\)*% Execution halted at:\\(\\s-*\\S-+\\s-*[0-9]+\\s-*.*\\)\n"
+  "^% .*\n\\([^%].*\n\\)*% Execution halted at:\\(\\s-*\\S-+\\s-*[0-9]+.*\\)\n"
   "A regular expression to match errors which halt execution.")
 
 (defvar idlwave-shell-cant-continue-error
index 5da5577c10832d286bcb239a240e431ca89b3f84..e16225c7fa9e61a0c6c73cafe5c29223ef7c193d 100644 (file)
@@ -801,7 +801,7 @@ The style of the comment is controlled by `ruby-encoding-magic-comment-style'."
       (let ((coding-system (ruby--detect-encoding)))
         (when coding-system
           (if (looking-at "^#!") (beginning-of-line 2))
-          (cond ((looking-at "\\s *#\\s *.*\\(en\\)?coding\\s *:\\s *\\([-a-z0-9_]*\\)")
+          (cond ((looking-at "\\s *#.*\\(en\\)?coding\\s *:\\s *\\([-a-z0-9_]*\\)")
                  ;; update existing encoding comment if necessary
                  (unless (string= (match-string 2) coding-system)
                    (goto-char (match-beginning 2))
index a241a1e69ba9931e39477d608cbca55e18ce24ee..044d7820ee3c725331a335bb7bea5c6a365ca1b5 100644 (file)
@@ -1096,7 +1096,7 @@ subshells can nest."
     (")" (0 (sh-font-lock-paren (match-beginning 0))))
     ;; Highlight (possibly nested) subshells inside "" quoted
     ;; regions correctly.
-    ("\"\\(?:\\(?:[^\\\"]\\|\\\\.\\)*?\\)??\\(\\$(\\|`\\)"
+    ("\"\\(?:[^\\\"]\\|\\\\.\\)*?\\(\\$(\\|`\\)"
      (1 (ignore
          (if (nth 8 (save-excursion (syntax-ppss (match-beginning 0))))
              (goto-char (1+ (match-beginning 0)))
index 460957b71611e3c99b2510f2858379dba08f5df5..cc601601193f7a250ee76403b0db66cd6fd35782 100644 (file)
@@ -958,8 +958,8 @@ See `compilation-error-regexp-alist-alist' for the formatting.  For XEmacs.")
     ("syntax error:.*\n\\([^ \t]+\\) *\\([0-9]+\\):" 1 bold t)
     ("syntax error:.*\n\\([^ \t]+\\) *\\([0-9]+\\):" 2 bold t)
     ;; verilog-verilator
-    (".*%?\\(Error\\|Warning\\)\\(-[^:]+\\|\\):[\n ]*\\([^ \t:]+\\):\\([0-9]+\\):" 3 bold t)
-    (".*%?\\(Error\\|Warning\\)\\(-[^:]+\\|\\):[\n ]*\\([^ \t:]+\\):\\([0-9]+\\):" 4 bold t)
+    (".*\\(Error\\|Warning\\)\\(-[^:]+\\|\\):[\n ]*\\([^ \t:]+\\):\\([0-9]+\\):" 3 bold t)
+    (".*\\(Error\\|Warning\\)\\(-[^:]+\\|\\):[\n ]*\\([^ \t:]+\\):\\([0-9]+\\):" 4 bold t)
     ;; verilog-leda
     ("^In file \\([^ \t]+\\)[ \t]+line[ \t]+\\([0-9]+\\):\n[^\n]*\n[^\n]*\n\\(Warning\\|Error\\|Failure\\)[^\n]*" 1 bold t)
     ("^In file \\([^ \t]+\\)[ \t]+line[ \t]+\\([0-9]+\\):\n[^\n]*\n[^\n]*\n\\(Warning\\|Error\\|Failure\\)[^\n]*" 2 bold t)
@@ -5345,7 +5345,7 @@ becomes:
   (interactive)
   (save-excursion
     (beginning-of-line)
-    (when (looking-at "\\(.*\\)([WE]\\([0-9A-Z]+\\)).*,\\s +line\\s +[0-9]+:\\s +\\([^:\n]+\\):?.*$")
+    (when (looking-at "\\(.*\\)([WE]\\([0-9A-Z]+\\)).*,\\s +line\\s +[0-9]+:\\s +\\([^:\n]+\\).*$")
       (replace-match (format
                      ;; %3s makes numbers 1-999 line up nicely
                      "\\1//Verilint %3s off // WARNING: \\3"
@@ -6788,7 +6788,7 @@ Do not count named blocks or case-statements."
      ((looking-at verilog-named-block-re)
       (current-column))
      ((and (not (looking-at verilog-extended-case-re))
-          (looking-at "^[^:;]+[ \t]*:"))
+          (looking-at "^[^:;]+:"))
       (verilog-re-search-forward ":" nil t)
       (skip-chars-forward " \t")
       (current-column))
@@ -7782,7 +7782,7 @@ If search fails, other files are checked based on
   "Return point if within translate-off region, else nil."
   (and (save-excursion
         (re-search-backward
-         (concat "//\\s-*.*\\s-*" verilog-directive-regexp "\\(on\\|off\\)\\>")
+         (concat "//.*" verilog-directive-regexp "\\(on\\|off\\)\\>")
          nil t))
        (equal "off" (match-string 2))
        (point)))
@@ -7790,14 +7790,14 @@ If search fails, other files are checked based on
 (defun verilog-start-translate-off (limit)
   "Return point before translate-off directive if before LIMIT, else nil."
   (when (re-search-forward
-         (concat "//\\s-*.*\\s-*" verilog-directive-regexp "off\\>")
+         (concat "//.*" verilog-directive-regexp "off\\>")
          limit t)
     (match-beginning 0)))
 
 (defun verilog-back-to-start-translate-off (limit)
   "Return point before translate-off directive if before LIMIT, else nil."
   (when (re-search-backward
-         (concat "//\\s-*.*\\s-*" verilog-directive-regexp "off\\>")
+         (concat "//.*" verilog-directive-regexp "off\\>")
          limit t)
     (match-beginning 0)))
 
@@ -7805,7 +7805,7 @@ If search fails, other files are checked based on
   "Return point after translate-on directive if before LIMIT, else nil."
 
   (re-search-forward (concat
-                     "//\\s-*.*\\s-*" verilog-directive-regexp "on\\>") limit t))
+                     "//.*" verilog-directive-regexp "on\\>") limit t))
 
 (defun verilog-match-translate-off (limit)
   "Match a translate-off block, setting `match-data' and returning t, else nil.
@@ -9982,7 +9982,7 @@ Or, just the existing dirnames themselves if there are no wildcards."
       (while dirnames
         (setq dirname (car dirnames)
               dirnames (cdr dirnames))
-        (cond ((string-match (concat "^\\(\\|[/\\]*[^*?]*[/\\]\\)"  ; root
+        (cond ((string-match (concat "^\\(\\|[^*?]*[/\\]\\)"  ; root
                                      "\\([^/\\]*[*?][^/\\]*\\)"     ; filename with *?
                                      "\\(.*\\)")                    ; rest
                              dirname)
index 09dfeb61d17e1b20a3b51cb451c0f52bd26ce07a..b990c83cfcb86140728c169ad0c06a12ea06e157 100644 (file)
@@ -2796,12 +2796,12 @@ See `term-prompt-regexp'."
    "\\(?:[\r\n\000\007\t\b\016\017]\\|"
    ;; some Emacs specific control sequences, implemented by
    ;; `term-command-hook',
-   "\032[^\n]+\r?\n\\|"
+   "\032[^\n]+\n\\|"
    ;; a C1 escape coded character (see [ECMA-48] section 5.3 "Elements
    ;; of the C1 set"),
    "\e\\(?:[DM78c]\\|"
    ;; another Emacs specific control sequence,
-   "AnSiT[^\n]+\r?\n\\|"
+   "AnSiT[^\n]+\n\\|"
    ;; or an escape sequence (section 5.4 "Control Sequences"),
    "\\[\\([\x30-\x3F]*\\)[\x20-\x2F]*[\x40-\x7E]\\)\\)")
   "Regexp matching control sequences handled by term.el.")
index 50dd6cd5f5abf76f7305cfaa3254ba0f0096ac18..c9fd19d23240e6cd3fe2c83756216947496b34df 100644 (file)
@@ -925,7 +925,7 @@ DOWNCASE    t:   Downcase words before using them."
         "\\<label[[:space:]]*=[[:space:]]*"
         ;; Match the label value; braces around the value are
         ;; optional.
-        "{?\\(?1:[^] ,}\r\n\t%]+\\)}?"
+        "{?\\(?1:[^] ,}\r\n\t%]+\\)"
         ;; We are done.  Just search until the next closing bracket
         "[^]]*\\]"))
     "List of regexps matching \\label definitions.
index bcb67431aa8c33cf8e5a33335572429784076916..f16fc234025b9a2f0e33141e83338406ad5e4de5 100644 (file)
@@ -191,7 +191,7 @@ linked Emacs under SunOS 4.x."
         proc (concat (mapconcat 'identity
                                 (append url-gateway-telnet-parameters
                                         (list host service)) " ") "\n"))
-       (url-wait-for-string "^\r*Escape character.*\r*\n+" proc)
+       (url-wait-for-string "^\r*Escape character.*\n+" proc)
        (delete-region (point-min) (match-end 0))
        (process-send-string proc "\^]\n")
        (url-wait-for-string "^telnet" proc)
index cb0ae6ff6e1999b1d2b143ec9e18e44d3e6678b7..f6af5a45550634c1a3d45951775b74ed5347ad9a 100644 (file)
@@ -119,7 +119,7 @@ patch.  So, don't change these variables, unless the default doesn't work."
 (defcustom ediff-context-diff-label-regexp
   (let ((stuff "\\([^ \t\n]+\\)"))
     (concat "\\("      ; context diff 2-liner
-            "^\\*\\*\\* +" stuff "[^*]+[\t ]*\n--- +" stuff
+            "^\\*\\*\\* +" stuff "[^*]+\n--- +" stuff
             "\\|"      ; unified format diff 2-liner
             "^--- +" stuff ".*\n\\+\\+\\+ +" stuff
             "\\)"))
index 466c621311f377fd27214cdc226edba83304f76a..dd56aec94a06adf40babe28a55c8ce71dfda13ae 100644 (file)
@@ -472,7 +472,7 @@ The remaining KEYS are passed directly to `cvs-create-fileinfo'."
       ;; Let's not get all worked up if the format changes a bit
       (cvs-match " *Working revision:.*$"))
      (cvs-or
-      (cvs-match " *RCS Version:[ \t]*\\([0-9.]+\\)[ \t]*.*$" (head-rev 1))
+      (cvs-match " *RCS Version:[ \t]*\\([0-9.]+\\).*$" (head-rev 1))
       (cvs-match " *Repository revision:[ \t]*\\([0-9.]+\\)[ \t]*\\(.*\\)$"
                 (head-rev 1))
       (cvs-match " *Repository revision:.*"))
index ad0271049c3f198e99533c5e58d9a44d9f98b405..f9372e37b110cc75d771019cf59a374ed2b46924 100644 (file)
@@ -505,7 +505,7 @@ differences in behavior.")
      (cond
 
       ;; pattern
-      ((save-excursion (re-search-forward "^/\\(.*\\)/\\(.*i?\\)$" nil t))
+      ((save-excursion (re-search-forward "^/\\(.*\\)/\\(.*\\)$" nil t))
        (setq icase (string= "i" (match-string 2))
              pattern (regex-tests-unextend (match-string 1))))