chiark / gitweb /
el/dot-emacs.el (Man-getpage-in-background): Save match-data around loop.
authorMark Wooding <mdw@distorted.org.uk>
Mon, 22 Jun 2020 10:40:30 +0000 (11:40 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Mon, 22 Jun 2020 10:40:30 +0000 (11:40 +0100)
Rather than for each item we check.

el/dot-emacs.el

index 75e39a505f236e09099747543d76918fbd538710..5d4734402bd8ceea0afce235d1d3656317f0e4c6 100644 (file)
@@ -4540,12 +4540,12 @@ (defadvice Man-getpage-in-background
         (preloads (save-match-data (split-string old-preload ":")))
         (any nil)
         (filtered nil))
-    (while preloads
-      (let ((item (pop preloads)))
-       (if (save-match-data
-             (string-match  "\\(/\\|^\\)noip\.so\\(:\\|$\\)" item))
-           (setq any t)
-         (push item filtered))))
+    (save-match-data
+      (while preloads
+       (let ((item (pop preloads)))
+         (if (string-match  "\\(/\\|^\\)noip\.so\\(:\\|$\\)" item)
+             (setq any t)
+           (push item filtered)))))
     (if any
        (unwind-protect
            (progn