]> git.eshelyaron.com Git - emacs.git/commitdiff
Use string-search instead of string-match[-p]
authorMattias Engdegård <mattiase@acm.org>
Mon, 9 Aug 2021 09:20:00 +0000 (11:20 +0200)
committerMattias Engdegård <mattiase@acm.org>
Mon, 9 Aug 2021 09:35:56 +0000 (11:35 +0200)
`string-search` is easier to understand, less error-prone, much
faster, does not pollute the regexp cache, and does not mutate global
state.  Use it where applicable and obviously safe (erring on the
conservative side).

* admin/authors.el (authors-canonical-file-name)
(authors-scan-change-log):
* lisp/apropos.el (apropos-command)
(apropos-documentation-property, apropos-symbols-internal):
* lisp/arc-mode.el (archive-arc-summarize)
(archive-zoo-summarize):
* lisp/calc/calc-aent.el (math-read-factor):
* lisp/calc/calc-ext.el (math-read-big-expr)
(math-format-nice-expr, math-format-number-fancy):
* lisp/calc/calc-forms.el (math-read-angle-brackets):
* lisp/calc/calc-graph.el (calc-graph-set-range):
* lisp/calc/calc-keypd.el (calc-keypad-press):
* lisp/calc/calc-lang.el (tex, latex, math-read-big-rec):
* lisp/calc/calc-prog.el (calc-fix-token-name)
(calc-user-define-permanent, math-define-exp):
* lisp/calc/calc.el (calc-record, calcDigit-key)
(calc-count-lines):
* lisp/calc/calcalg2.el (calc-solve-for, calc-poly-roots)
(math-do-integral):
* lisp/calc/calcalg3.el (calc-find-root, calc-find-minimum)
(calc-get-fit-variables):
* lisp/cedet/ede/speedbar.el (ede-tag-expand):
* lisp/cedet/semantic/java.el (semantic-java-expand-tag):
* lisp/cedet/semantic/sb.el (semantic-sb-show-extra)
(semantic-sb-expand-group):
* lisp/cedet/semantic/wisent/python.el
(semantic-python-instance-variable-p):
* lisp/cus-edit.el (get):
* lisp/descr-text.el (describe-text-sexp):
* lisp/dired-aux.el (dired-compress-file):
* lisp/dired-x.el (dired-make-relative-symlink):
* lisp/dired.el (dired-glob-regexp):
* lisp/dos-fns.el (dos-convert-standard-filename, dos-8+3-filename):
* lisp/edmacro.el (edmacro-format-keys):
* lisp/emacs-lisp/eieio-opt.el (eieio-sb-expand):
* lisp/emacs-lisp/eieio-speedbar.el (eieio-speedbar-object-expand):
* lisp/emacs-lisp/lisp-mnt.el (lm-keywords-list):
* lisp/emacs-lisp/warnings.el (display-warning):
* lisp/emulation/viper-ex.el (viper-ex-read-file-name)
(ex-print-display-lines):
* lisp/env.el (read-envvar-name, setenv):
* lisp/epa-mail.el (epa-mail-encrypt):
* lisp/epg.el (epg--start):
* lisp/erc/erc-backend.el (erc-parse-server-response):
* lisp/erc/erc-dcc.el (erc-dcc-member):
* lisp/erc/erc-speedbar.el (erc-speedbar-expand-server)
(erc-speedbar-expand-channel, erc-speedbar-expand-user):
* lisp/erc/erc.el (erc-send-input):
* lisp/eshell/em-glob.el (eshell-glob-entries):
* lisp/eshell/esh-proc.el (eshell-needs-pipe-p):
* lisp/eshell/esh-util.el (eshell-convert):
* lisp/eshell/esh-var.el (eshell-envvar-names):
* lisp/faces.el (x-resolve-font-name):
* lisp/ffap.el (ffap-file-at-point):
* lisp/files.el (wildcard-to-regexp, shell-quote-wildcard-pattern):
* lisp/forms.el (forms--update):
* lisp/frameset.el (frameset-filter-unshelve-param):
* lisp/gnus/gnus-art.el (article-decode-charset):
* lisp/gnus/gnus-kill.el (gnus-kill-parse-rn-kill-file):
* lisp/gnus/gnus-mlspl.el (gnus-group-split-fancy):
* lisp/gnus/gnus-msg.el (gnus-summary-resend-message-insert-gcc)
(gnus-inews-insert-gcc):
* lisp/gnus/gnus-rfc1843.el (rfc1843-decode-article-body):
* lisp/gnus/gnus-search.el (gnus-search-indexed-parse-output)
(gnus-search--complete-key-data):
* lisp/gnus/gnus-spec.el (gnus-parse-simple-format):
* lisp/gnus/gnus-sum.el (gnus-summary-refer-article):
* lisp/gnus/gnus-util.el (gnus-extract-address-components)
(gnus-newsgroup-directory-form):
* lisp/gnus/gnus-uu.el (gnus-uu-grab-view):
* lisp/gnus/gnus.el (gnus-group-native-p, gnus-short-group-name):
* lisp/gnus/message.el (message-check-news-header-syntax)
(message-make-message-id, message-user-mail-address)
(message-make-fqdn, message-get-reply-headers, message-followup):
* lisp/gnus/mm-decode.el (mm-dissect-buffer):
* lisp/gnus/nnheader.el (nnheader-insert):
* lisp/gnus/nnimap.el (nnimap-process-quirk)
(nnimap-imap-ranges-to-gnus-ranges):
* lisp/gnus/nnmaildir.el (nnmaildir--ensure-suffix):
* lisp/gnus/nnmairix.el (nnmairix-determine-original-group-from-path):
* lisp/gnus/nnrss.el (nnrss-match-macro):
* lisp/gnus/nntp.el (nntp-find-group-and-number):
* lisp/help-fns.el (help--symbol-completion-table-affixation):
* lisp/help.el (help-function-arglist):
* lisp/hippie-exp.el (he-concat-directory-file-name):
* lisp/htmlfontify.el (hfy-relstub):
* lisp/ido.el (ido-make-prompt, ido-complete, ido-copy-current-word)
(ido-exhibit):
* lisp/image/image-converter.el (image-convert-p):
* lisp/info-xref.el (info-xref-docstrings):
* lisp/info.el (Info-toc-build, Info-follow-reference)
(Info-backward-node, Info-finder-find-node)
(Info-speedbar-expand-node):
* lisp/international/mule-diag.el (print-fontset-element):
* lisp/language/korea-util.el (default-korean-keyboard):
* lisp/linum.el (linum-after-change):
* lisp/mail/ietf-drums.el (ietf-drums-parse-address):
* lisp/mail/mail-utils.el (mail-dont-reply-to):
* lisp/mail/rfc2047.el (rfc2047-encode-1, rfc2047-decode-string):
* lisp/mail/rfc2231.el (rfc2231-parse-string):
* lisp/mail/rmailkwd.el (rmail-set-label):
* lisp/mail/rmailsum.el (rmail-header-summary):
* lisp/mail/smtpmail.el (smtpmail-maybe-append-domain)
(smtpmail-user-mail-address):
* lisp/mail/uce.el (uce-reply-to-uce):
* lisp/man.el (Man-default-man-entry):
* lisp/mh-e/mh-alias.el (mh-alias-gecos-name)
(mh-alias-minibuffer-confirm-address):
* lisp/mh-e/mh-comp.el (mh-forwarded-letter-subject):
* lisp/mh-e/mh-speed.el (mh-speed-parse-flists-output):
* lisp/mh-e/mh-utils.el (mh-collect-folder-names-filter)
(mh-folder-completion-function):
* lisp/minibuffer.el (completion--make-envvar-table)
(completion-file-name-table, completion-flex-try-completion)
(completion-flex-all-completions):
* lisp/mpc.el (mpc--proc-quote-string, mpc-cmd-special-tag-p)
(mpc-constraints-tag-lookup):
* lisp/net/ange-ftp.el (ange-ftp-send-cmd)
(ange-ftp-allow-child-lookup):
* lisp/net/mailcap.el (mailcap-mime-types):
* lisp/net/mairix.el (mairix-search-thread-this-article):
* lisp/net/pop3.el (pop3-open-server):
* lisp/net/soap-client.el (soap-decode-xs-complex-type):
* lisp/net/socks.el (socks-filter):
* lisp/nxml/nxml-outln.el (nxml-highlighted-qname):
* lisp/nxml/rng-cmpct.el (rng-c-expand-name, rng-c-expand-datatype):
* lisp/nxml/rng-uri.el (rng-uri-file-name-1):
* lisp/obsolete/complete.el (partial-completion-mode)
(PC-do-completion):
* lisp/obsolete/longlines.el (longlines-encode-string):
* lisp/obsolete/nnir.el (nnir-compose-result):
* lisp/obsolete/terminal.el (te-quote-arg-for-sh):
* lisp/obsolete/tpu-edt.el (tpu-check-search-case):
* lisp/obsolete/url-ns.el (isPlainHostName):
* lisp/pcmpl-unix.el (pcomplete/scp):
* lisp/play/dunnet.el (dun-listify-string2, dun-get-path)
(dun-unix-parse, dun-doassign, dun-cat, dun-batch-unix-interface):
* lisp/progmodes/ebnf2ps.el: (ebnf-eps-header-footer-comment):
* lisp/progmodes/gdb-mi.el (gdb-var-delete)
(gdb-speedbar-expand-node, gdbmi-bnf-incomplete-record-result):
* lisp/progmodes/gud.el (gud-find-expr):
* lisp/progmodes/idlw-help.el (idlwave-do-context-help1):
* lisp/progmodes/idlw-shell.el (idlwave-shell-mode)
(idlwave-shell-filter-hidden-output, idlwave-shell-filter):
* lisp/progmodes/idlwave.el (idlwave-skip-label-or-case)
(idlwave-routine-info):
* lisp/progmodes/octave.el (inferior-octave-completion-at-point):
* lisp/progmodes/sh-script.el (sh-add-completer):
* lisp/progmodes/sql.el (defun):
* lisp/progmodes/xscheme.el (xscheme-process-filter):
* lisp/replace.el (query-replace-compile-replacement)
(map-query-replace-regexp):
* lisp/shell.el (shell--command-completion-data)
(shell-environment-variable-completion):
* lisp/simple.el (display-message-or-buffer):
* lisp/speedbar.el (speedbar-dired, speedbar-tag-file)
(speedbar-tag-expand):
* lisp/subr.el (split-string-and-unquote):
* lisp/tar-mode.el (tar-extract):
* lisp/term.el (term-command-hook, serial-read-name):
* lisp/textmodes/bibtex.el (bibtex-print-help-message):
* lisp/textmodes/ispell.el (ispell-lookup-words, ispell-filter)
(ispell-parse-output, ispell-buffer-local-parsing):
* lisp/textmodes/reftex-cite.el (reftex-do-citation):
* lisp/textmodes/reftex-parse.el (reftex-notice-new):
* lisp/textmodes/reftex-ref.el (reftex-show-entry):
* lisp/textmodes/reftex.el (reftex-compile-variables):
* lisp/textmodes/tex-mode.el (tex-send-command)
(tex-start-tex, tex-append):
* lisp/thingatpt.el (thing-at-point-url-at-point):
* lisp/tmm.el (tmm-add-one-shortcut):
* lisp/transient.el (transient-format-key):
* lisp/url/url-auth.el (url-basic-auth)
(url-digest-auth-directory-id-assoc):
* lisp/url/url-news.el (url-news):
* lisp/url/url-util.el (url-parse-query-string):
* lisp/vc/vc-cvs.el (vc-cvs-parse-entry):
* lisp/wid-browse.el (widget-browse-sexp):
* lisp/woman.el (woman-parse-colon-path, woman-mini-help)
(WoMan-getpage-in-background, woman-negative-vertical-space):
* lisp/xml.el:
* test/lisp/emacs-lisp/check-declare-tests.el
(check-declare-tests-warn):
* test/lisp/files-tests.el
(files-tests-file-name-non-special-dired-compress-handler):
* test/lisp/net/network-stream-tests.el (server-process-filter):
* test/src/coding-tests.el (ert-test-unibyte-buffer-dos-eol-decode):
Use `string-search` instead of `string-match` and `string-match-p`.

145 files changed:
admin/authors.el
lisp/apropos.el
lisp/arc-mode.el
lisp/calc/calc-aent.el
lisp/calc/calc-ext.el
lisp/calc/calc-forms.el
lisp/calc/calc-graph.el
lisp/calc/calc-keypd.el
lisp/calc/calc-lang.el
lisp/calc/calc-prog.el
lisp/calc/calc.el
lisp/calc/calcalg2.el
lisp/calc/calcalg3.el
lisp/cedet/ede/speedbar.el
lisp/cedet/semantic/java.el
lisp/cedet/semantic/sb.el
lisp/cedet/semantic/wisent/python.el
lisp/cus-edit.el
lisp/descr-text.el
lisp/dired-aux.el
lisp/dired-x.el
lisp/dired.el
lisp/dos-fns.el
lisp/edmacro.el
lisp/emacs-lisp/eieio-opt.el
lisp/emacs-lisp/eieio-speedbar.el
lisp/emacs-lisp/lisp-mnt.el
lisp/emacs-lisp/warnings.el
lisp/emulation/viper-ex.el
lisp/env.el
lisp/epa-mail.el
lisp/epg.el
lisp/erc/erc-backend.el
lisp/erc/erc-dcc.el
lisp/erc/erc-speedbar.el
lisp/erc/erc.el
lisp/eshell/em-glob.el
lisp/eshell/esh-proc.el
lisp/eshell/esh-util.el
lisp/eshell/esh-var.el
lisp/faces.el
lisp/ffap.el
lisp/files.el
lisp/forms.el
lisp/frameset.el
lisp/gnus/gnus-art.el
lisp/gnus/gnus-kill.el
lisp/gnus/gnus-mlspl.el
lisp/gnus/gnus-msg.el
lisp/gnus/gnus-rfc1843.el
lisp/gnus/gnus-search.el
lisp/gnus/gnus-spec.el
lisp/gnus/gnus-sum.el
lisp/gnus/gnus-util.el
lisp/gnus/gnus-uu.el
lisp/gnus/gnus.el
lisp/gnus/message.el
lisp/gnus/mm-decode.el
lisp/gnus/nnheader.el
lisp/gnus/nnimap.el
lisp/gnus/nnmaildir.el
lisp/gnus/nnmairix.el
lisp/gnus/nnrss.el
lisp/gnus/nntp.el
lisp/help-fns.el
lisp/help.el
lisp/hippie-exp.el
lisp/htmlfontify.el
lisp/ido.el
lisp/image/image-converter.el
lisp/info-xref.el
lisp/info.el
lisp/international/mule-diag.el
lisp/language/korea-util.el
lisp/linum.el
lisp/mail/ietf-drums.el
lisp/mail/mail-utils.el
lisp/mail/rfc2047.el
lisp/mail/rfc2231.el
lisp/mail/rmailkwd.el
lisp/mail/rmailsum.el
lisp/mail/smtpmail.el
lisp/mail/uce.el
lisp/man.el
lisp/mh-e/mh-alias.el
lisp/mh-e/mh-comp.el
lisp/mh-e/mh-speed.el
lisp/mh-e/mh-utils.el
lisp/minibuffer.el
lisp/mpc.el
lisp/net/ange-ftp.el
lisp/net/mailcap.el
lisp/net/mairix.el
lisp/net/pop3.el
lisp/net/soap-client.el
lisp/net/socks.el
lisp/nxml/nxml-outln.el
lisp/nxml/rng-cmpct.el
lisp/nxml/rng-uri.el
lisp/obsolete/complete.el
lisp/obsolete/longlines.el
lisp/obsolete/nnir.el
lisp/obsolete/terminal.el
lisp/obsolete/tpu-edt.el
lisp/obsolete/url-ns.el
lisp/pcmpl-unix.el
lisp/play/dunnet.el
lisp/progmodes/ebnf2ps.el
lisp/progmodes/gdb-mi.el
lisp/progmodes/gud.el
lisp/progmodes/idlw-help.el
lisp/progmodes/idlw-shell.el
lisp/progmodes/idlwave.el
lisp/progmodes/octave.el
lisp/progmodes/sh-script.el
lisp/progmodes/sql.el
lisp/progmodes/xscheme.el
lisp/replace.el
lisp/shell.el
lisp/simple.el
lisp/speedbar.el
lisp/subr.el
lisp/tar-mode.el
lisp/term.el
lisp/textmodes/bibtex.el
lisp/textmodes/ispell.el
lisp/textmodes/reftex-cite.el
lisp/textmodes/reftex-parse.el
lisp/textmodes/reftex-ref.el
lisp/textmodes/reftex.el
lisp/textmodes/tex-mode.el
lisp/thingatpt.el
lisp/tmm.el
lisp/transient.el
lisp/url/url-auth.el
lisp/url/url-news.el
lisp/url/url-util.el
lisp/vc/vc-cvs.el
lisp/wid-browse.el
lisp/woman.el
lisp/xml.el
test/lisp/emacs-lisp/check-declare-tests.el
test/lisp/files-tests.el
test/lisp/net/network-stream-tests.el
test/src/coding-tests.el

index a400b1327afd822636c95dd5a3609780be3b63d5..b4e6c934b67f2fd4f2956e1cd41ef8329ba456f1 100644 (file)
@@ -1330,7 +1330,7 @@ to print a message if FILE is not found."
       (unless (or valid
                  (member file authors-ignored-files)
                  (authors-obsolete-file-p file)
-                 (string-match "[*]" file)
+                 (string-search "*" file)
                  (string-match "^[0-9.]+$" file)
                  laxlog)
        (setq authors-invalid-file-names
@@ -1465,7 +1465,7 @@ Suggested\\|Trivial\\|Version\\|Originally\\|From:\\|Patch[ \t]+[Bb]y\\)")))
                ((looking-at "^[ \t]+\\*")
                 (let ((line (buffer-substring-no-properties
                              (match-end 0) (line-end-position))))
-                  (while (and (not (string-match ":" line))
+                  (while (and (not (string-search ":" line))
                               (forward-line 1)
                               (not (looking-at ":\\|^[ \t]*$")))
                     (setq line (concat line
index 376c1b2cbc588e195d4c54c5041a031e91abd441..a1470537d9ada95c2938d5421d2e6d67067f715a 100644 (file)
@@ -616,7 +616,7 @@ while a list of strings is used as a word list."
                              (if (eq doc 'error)
                                  "(documentation error)"
                               (setq score (+ score (apropos-score-doc doc)))
-                              (substring doc 0 (string-match "\n" doc)))
+                              (substring doc 0 (string-search "\n" doc)))
                           "(not documented)")))
                   (and var-predicate
                        (funcall var-predicate symbol)
@@ -625,7 +625,7 @@ while a list of strings is used as a word list."
                             (progn
                               (setq score (+ score (apropos-score-doc doc)))
                               (substring doc 0
-                                         (string-match "\n" doc)))))))
+                                         (string-search "\n" doc)))))))
        (setcar (cdr (car p)) score)
        (setq p (cdr p))))
     (and (let ((apropos-multi-type do-all))
@@ -639,7 +639,7 @@ while a list of strings is used as a word list."
   "Like (documentation-property SYMBOL PROPERTY RAW) but handle errors."
   (condition-case ()
       (let ((doc (documentation-property symbol property raw)))
-       (if doc (substring doc 0 (string-match "\n" doc))
+       (if doc (substring doc 0 (string-search "\n" doc))
          "(not documented)"))
     (error "(error retrieving documentation)")))
 
@@ -767,7 +767,7 @@ the output includes key-bindings of commands."
                                  "(alias for undefined function)")
                                 (error
                                  "(can't retrieve function documentation)")))
-                    (substring doc 0 (string-match "\n" doc))
+                    (substring doc 0 (string-search "\n" doc))
                   "(not documented)"))
               (when (boundp symbol)
                 (apropos-documentation-property
index 83c516100ab274bcda08b0f8b45d88b28db3c105..71ad7bd0c5dbfa4c40f92ba1443e166c83561f24 100644 (file)
@@ -1707,7 +1707,7 @@ This doesn't recover lost files, it just undoes changes in the buffer itself."
                (= (get-byte p) ?\C-z)
                (> (get-byte (1+ p)) 0))
       (let* ((namefld (buffer-substring (+ p 2) (+ p 2 13)))
-            (fnlen   (or (string-match "\0" namefld) 13))
+            (fnlen   (or (string-search "\0" namefld) 13))
             (efnname (decode-coding-string (substring namefld 0 fnlen)
                                            archive-file-name-coding-system))
              (csize   (archive-l-e (+ p 15) 4))
@@ -2089,7 +2089,7 @@ This doesn't recover lost files, it just undoes changes in the buffer itself."
             (dirtype (get-byte (+ p 4)))
             (lfnlen  (if (= dirtype 2) (get-byte (+ p 56)) 0))
             (ldirlen (if (= dirtype 2) (get-byte (+ p 57)) 0))
-            (fnlen   (or (string-match "\0" namefld) 13))
+            (fnlen   (or (string-search "\0" namefld) 13))
             (efnname (let ((str
                             (concat
                              (if (> ldirlen 0)
index 1e31c3cadc01491200357155486ae58555b10ac1..db4751a9fbbac5d9a70ec05de5251465a6f33347 100644 (file)
@@ -1139,7 +1139,7 @@ If the current Calc language does not use placeholders, return nil."
                                   0)
                                (setq sym (intern (substring (symbol-name sym)
                                                             1))))
-                          (or (string-match "-" (symbol-name sym))
+                          (or (string-search "-" (symbol-name sym))
                               (setq sym (intern
                                          (concat "calcFunc-"
                                                  (symbol-name sym))))))
@@ -1149,7 +1149,7 @@ If the current Calc language does not use placeholders, return nil."
                 (let ((val (list 'var
                                  (intern (math-remove-dashes
                                           (symbol-name sym)))
-                                 (if (string-match "-" (symbol-name sym))
+                                 (if (string-search "-" (symbol-name sym))
                                      sym
                                    (intern (concat "var-"
                                                    (symbol-name sym)))))))
index e85ecf039064831020d07142458f568344690861..45337e187be7dc237207c9a0e28693caa99c805d 100644 (file)
@@ -3088,7 +3088,7 @@ If X is not an error form, return 1."
          (math-read-big-err-msg nil)
          math-read-big-baseline math-read-big-h2
          new-pos p)
-      (while (setq new-pos (string-match "\n" str pos))
+      (while (setq new-pos (string-search "\n" str pos))
        (setq math-read-big-lines
               (cons (substring str pos new-pos) math-read-big-lines)
              pos (1+ new-pos)))
@@ -3249,7 +3249,7 @@ If X is not an error form, return 1."
        (t
         (let ((str (math-format-flat-expr x 0))
               (pos 0) p)
-          (or (string-match "\"" str)
+          (or (string-search "\"" str)
               (while (<= (setq p (+ pos w)) (length str))
                 (while (and (> (setq p (1- p)) pos)
                             (not (= (aref str p) ? ))))
@@ -3278,7 +3278,7 @@ If X is not an error form, return 1."
                              (math-format-radix-float a prec))
                   (format "%d#%s" calc-number-radix
                           (math-format-radix-float a prec)))))
-       (if (and prec (> prec 191) (string-match "\\*" str))
+       (if (and prec (> prec 191) (string-search "*" str))
            (concat "(" str ")")
          str))))
    ((eq (car a) 'frac)
index ee53b94cd64a5be64442e905eec1c5765cfbba13..ac57011da0457d8e17d0137a6577e760dfcdfecf 100644 (file)
@@ -2238,7 +2238,7 @@ and ends on the last Sunday of October at 2 a.m."
                  (if (eq (car-safe str2) 'error)
                      str2
                    (append '(calcFunc-lambda) (cdr str1) (list str2)))))
-           (if (string-match "#" str)
+           (if (string-search "#" str)
                (let ((calc-hashes-used 0))
                  (and (setq str (math-read-expr str))
                       (if (eq (car-safe str) 'error)
index 423d1e64126685de7dd5480094e005b9e5a34072..9ac24bf188941049bc0f3839ebc2790f1a793fa6 100644 (file)
@@ -1025,7 +1025,7 @@ This \"dumb\" driver will be present in Gnuplot 3.0."
         (calc-pop-stack 1))))
   (if (string-match "\\[.+\\]" range)
       (setq range (substring range 1 -1)))
-  (if (and (not (string-match ":" range))
+  (if (and (not (string-search ":" range))
           (or (string-match "," range)
               (string-match " " range)))
       (aset range (match-beginning 0) ?\:))
index 1902a4f3f29c712626718055ed446229079e16a3..acbef27a1daab5868a8612b202ffa9ac8d9a0834 100644 (file)
                                              ":"
                                            (if (and (equal cmd "e")
                                                     (or (not input)
-                                                        (string-match
+                                                        (string-search
                                                          "#" input))
                                                     (> radix 14))
                                                (format "*%d.^" radix)
index 0117f449dd55962c12cc0c91251ea2c9847cd0d4..aef3173f5c023744c036b52a7762b066c0f2c832 100644 (file)
                    (setq math-exp-pos (match-end 0)
                          math-exp-token 'punc
                          math-expr-data "[")
-                   (let ((right (string-match "}" math-exp-str math-exp-pos)))
+                   (let ((right (string-search "}" math-exp-str math-exp-pos)))
                      (and right
                           (setq math-exp-str (copy-sequence math-exp-str))
                           (aset math-exp-str right ?\]))))))))))
                    (setq math-exp-pos (match-end 0)
                          math-exp-token 'punc
                          math-expr-data "[")
-                   (let ((right (string-match "}" math-exp-str math-exp-pos)))
+                   (let ((right (string-search "}" math-exp-str math-exp-pos)))
                      (and right
                           (setq math-exp-str (copy-sequence math-exp-str))
                           (aset math-exp-str right ?\]))))))))))
@@ -2342,7 +2342,7 @@ order to Calc's."
             (math-read-big-emptyp math-rb-h1 (1+ v) h math-rb-v2 nil t)
             (if (= (math-read-big-char widest v) ?\()
                 (progn
-                  (setq line (if (string-match "-" p)
+                  (setq line (if (string-search "-" p)
                                  (intern p)
                                (intern (concat "calcFunc-" p)))
                         h (1+ widest)
@@ -2362,7 +2362,7 @@ order to Calc's."
                   (setq p (cons line (nreverse p))))
               (setq p (list 'var
                             (intern (math-remove-dashes p))
-                            (if (string-match "-" p)
+                            (if (string-search "-" p)
                                 (intern p)
                               (intern (concat "var-" p)))))))
 
index 6f1e5c782dfca041df836f7470595c471453950d..f9dd9eb98a90d9289d5b4ab8773a6415466bbdf8 100644 (file)
        ((equal name "#")
         (search-backward "#")
         (error "Token `#' is reserved"))
-       ((and unquoted (string-match "#" name))
+       ((and unquoted (string-search "#" name))
         (error "Tokens containing `#' must be quoted"))
        ((not (string-match "[^ ]" name))
         (search-backward "\"" nil t)
@@ -1068,7 +1068,7 @@ Redefine the corresponding command."
             (insert (setq str (prin1-to-string
                                (cons 'defun (cons cmd (cdr fcmd)))))
                     "\n")
-            (or (and (string-match "\"" str) (not q-ok))
+            (or (and (string-search "\"" str) (not q-ok))
                 (fill-region pt (point)))
             (indent-rigidly pt (point) 2)
             (delete-region pt (1+ pt))
@@ -1087,7 +1087,7 @@ Redefine the corresponding command."
                                         (cons 'defun (cons func
                                                            (cdr ffunc)))))
                              "\n")
-                     (or (and (string-match "\"" str) (not q-ok))
+                     (or (and (string-search "\"" str) (not q-ok))
                          (fill-region pt (point)))
                      (indent-rigidly pt (point) 2)
                      (delete-region pt (1+ pt))
@@ -2132,7 +2132,7 @@ Redefine the corresponding command."
                  (cdr prim))
                 ((memq exp math-exp-env)
                  exp)
-                ((string-match "-" name)
+                ((string-search "-" name)
                  exp)
                 (t
                  (intern (concat "var-" name))))))
index 1e7d5e7766c885e47ff91eee7dbce5ad4fe80332..a10b3178302f38b5e7ae64d0365729f290642eb7 100644 (file)
@@ -2126,7 +2126,7 @@ the United States."
            (goto-char (point-max))
            (cond ((null prefix) (insert "     "))
                  ((and (> (length prefix) 4)
-                       (string-match " " prefix 4))
+                       (string-search " " prefix 4))
                   (insert (substring prefix 0 4) " "))
                  (t (insert (format "%4s " prefix))))
            (insert fval "\n")
@@ -2469,7 +2469,7 @@ the United States."
              (calc-minibuffer-contains
               "[-+]?\\(.*\\+/- *\\|.*mod *\\)?\\([0-9]+\\.?0*[@oh] *\\)?\\([0-9]+\\.?0*['m] *\\)?[0-9]*\\(\\.?[0-9]*\\(e[-+]?[0-3]?[0-9]?[0-9]?[0-9]?[0-9]?[0-9]?[0-9]?\\)?\\|[0-9]:\\([0-9]+:\\)?[0-9]*\\)?[\"s]?\\'"))
          (if (and (memq last-command-event '(?@ ?o ?h ?\' ?m))
-                  (string-match " " calc-hms-format))
+                  (string-search " " calc-hms-format))
              (insert " "))
        (if (and (memq last-command '(calcDigit-start calcDigit-key))
                 (eq last-command-event ?.))
@@ -3059,7 +3059,7 @@ the United States."
 (defun calc-count-lines (s)
   (let ((pos 0)
        (num 1))
-    (while (setq pos (string-match "\n" s pos))
+    (while (setq pos (string-search "\n" s pos))
       (setq pos (1+ pos)
            num (1+ num)))
     num))
index 94b99aa29d8c1ec74b111e30eb2656f259b53500..8d93ae987a181ccf4a2b8aa2fad3fd81b8301e3a 100644 (file)
                                           (calc-top-n 2)
                                           (calc-top-n 1)))
        (let ((var (if (and (string-match ",\\|[^ ] +[^ ]" var)
-                          (not (string-match "\\[" var)))
+                          (not (string-search "[" var)))
                      (math-read-expr (concat "[" var "]"))
                    (math-read-expr var))))
         (if (eq (car-safe var) 'error)
                                         (calc-top-n 2)
                                         (calc-top-n 1)))
      (let ((var (if (and (string-match ",\\|[^ ] +[^ ]" var)
-                        (not (string-match "\\[" var)))
+                        (not (string-search "[" var)))
                    (math-read-expr (concat "[" var "]"))
                  (math-read-expr var))))
        (if (eq (car-safe var) 'error)
                 (fset 'calcFunc-integ math-old-integ))))
 
        ;; See if the function is a symbolic derivative.
-       (and (string-match "'" (symbol-name (car expr)))
+       (and (string-search "'" (symbol-name (car expr)))
             (let ((name (symbol-name (car expr)))
                   (p expr) (n 0) (which nil) (bad nil))
               (while (setq n (1+ n) p (cdr p))
index ee3ae0a4c1fe341bd3859621bc7e4957bfb3526a..3cb1886f3bd57f621a7b1d44ab6895974838a208 100644 (file)
@@ -56,7 +56,7 @@
                                           (calc-top-n 1)
                                           (calc-top-n 2)))
        (let ((var (if (and (string-match ",\\|[^ ] +[^ ]" var)
-                          (not (string-match "\\[" var)))
+                          (not (string-search "[" var)))
                      (math-read-expr (concat "[" var "]"))
                    (math-read-expr var))))
         (if (eq (car-safe var) 'error)
@@ -81,7 +81,7 @@
                                        (calc-top-n 1)
                                        (calc-top-n 2)))
        (let ((var (if (and (string-match ",\\|[^ ] +[^ ]" var)
-                          (not (string-match "\\[" var)))
+                          (not (string-search "[" var)))
                      (math-read-expr (concat "[" var "]"))
                    (math-read-expr var))))
         (if (eq (car-safe var) 'error)
                                                       defc)
                                               ",")))))
        (coefs nil))
-    (setq vars (if (string-match "\\[" vars)
+    (setq vars (if (string-search "[" vars)
                   (math-read-expr vars)
                 (math-read-expr (concat "[" vars "]"))))
     (if (eq (car-safe vars) 'error)
index 01d4f943df5c021ff92e98ca4f2cedc27ec86464..b321cb637bce5faa52c256305bf815d8ba203629 100644 (file)
@@ -276,7 +276,7 @@ INDENT is the current indentation level."
 Etags does not support this feature.  TEXT will be the button
 string.  TOKEN will be the list, and INDENT is the current indentation
 level."
-  (cond ((string-match "\\+" text)     ;we have to expand this file
+  (cond ((string-search "+" text)      ;we have to expand this file
         (speedbar-change-expand-button-char ?-)
         (speedbar-with-writable
           (save-excursion
@@ -284,7 +284,7 @@ level."
             (speedbar-insert-generic-list indent token
                                           'ede-tag-expand
                                           'ede-tag-find))))
-       ((string-match "-" text)        ;we have to contract this node
+       ((string-search "-" text)       ;we have to contract this node
         (speedbar-change-expand-button-char ?+)
         (speedbar-delete-subblock indent))
        (t (error "Ooops...  not sure what to do")))
index f48b835fe39b07c20661c1c3a81a489796750126..0c2fb843f0b3d832790d1c5d32a4e7e3e4f17ec2 100644 (file)
@@ -141,7 +141,7 @@ corresponding compound declaration."
         (semantic-tag-put-attribute clone :dereference (+ dim0 (cdr dim)))
         (semantic-tag-set-bounds clone start end)))
 
-     ((and (eq class 'type) (string-match "\\." (semantic-tag-name tag)))
+     ((and (eq class 'type) (string-search "." (semantic-tag-name tag)))
       ;; javap outputs files where the package name is stuck onto the class or interface
       ;; name.  To make this more regular, we extract the package name into a package statement,
       ;; then make the class name regular.
index debdfd1dc04bba297662bd85447ce4b5abbddf4a..fe981d34fb78112dc9b96be5396a3e89d9234f9f 100644 (file)
@@ -279,7 +279,7 @@ Optional MODIFIERS is additional text needed for variables."
 (defun semantic-sb-show-extra (text token indent)
   "Display additional information about the token as an expansion.
 TEXT TOKEN and INDENT are the details."
-  (cond ((string-match "\\+" text)     ;we have to expand this file
+  (cond ((string-search "+" text)      ;we have to expand this file
         (speedbar-change-expand-button-char ?-)
         (speedbar-with-writable
           (save-excursion
@@ -288,7 +288,7 @@ TEXT TOKEN and INDENT are the details."
               (narrow-to-region (point) (point))
               ;; Add in stuff specific to this type of token.
               (semantic-sb-insert-details token (1+ indent))))))
-       ((string-match "-" text)        ;we have to contract this node
+       ((string-search "-" text)       ;we have to contract this node
         (speedbar-change-expand-button-char ?+)
         (speedbar-delete-subblock indent))
        (t (error "Ooops...  not sure what to do")))
@@ -325,7 +325,7 @@ TEXT TOKEN and INDENT are the details."
 (defun semantic-sb-expand-group (text token indent)
   "Expand a group which has semantic tokens.
 TEXT TOKEN and INDENT are the details."
-  (cond ((string-match "\\+" text)     ;we have to expand this file
+  (cond ((string-search "+" text)      ;we have to expand this file
         (speedbar-change-expand-button-char ?-)
         (speedbar-with-writable
           (save-excursion
@@ -333,7 +333,7 @@ TEXT TOKEN and INDENT are the details."
             (save-restriction
               (narrow-to-region (point-min) (point))
               (semantic-sb-buttons-plain (1+ indent) token)))))
-       ((string-match "-" text)        ;we have to contract this node
+       ((string-search "-" text)       ;we have to contract this node
         (speedbar-change-expand-button-char ?+)
         (speedbar-delete-subblock indent))
        (t (error "Ooops...  not sure what to do")))
index 9ac4ed9f518f09b8cf79c8d9f508dfb77936a696..fb878dde71205842c903f69deb553162d258d274 100644 (file)
@@ -555,7 +555,7 @@ SELF or the instance name \"self\" if SELF is nil."
             (rx-to-string
              `(seq string-start ,(or self "self") "."))
             name)
-       (not (string-match "\\." (substring name 5)))))))
+       (not (string-search "." (substring name 5)))))))
 
 (defun semantic-python-docstring-p (tag)
   "Return non-nil, when TAG is a Python documentation string."
index 980a1cc71793bfec0fb3e031adbd1bae41604db2..7eae2e416bbe7b22e1ad3de2c6064ccda0982fce 100644 (file)
@@ -1910,7 +1910,7 @@ item in another window.\n\n"))
 (widget-put (get 'editable-field 'widget-type)
            :custom-show (lambda (_widget value)
                           (let ((pp (pp-to-string value)))
-                            (cond ((string-match-p "\n" pp)
+                            (cond ((string-search "\n" pp)
                                    nil)
                                   ((> (length pp) 40)
                                    nil)
index 85017de5d5e398194661b3ad4358f2e11c76f7a0..f5e467d37e7d00b687e5059424e459da7db34d5a 100644 (file)
@@ -50,7 +50,7 @@
     (when (string-match-p "\n\\'" pp)
       (setq pp (substring pp 0 (1- (length pp)))))
 
-    (if (and (not (string-match-p "\n" pp))
+    (if (and (not (string-search "\n" pp))
             (<= (length pp) (- (window-width) (current-column))))
        (insert pp)
       (insert-text-button
index 5dbd55849e9fc419ea0d3fb5b51a4f6a9e2f7a47..0b8c693b29ff5620e91f8ed17a3d9d865e63a8df 100644 (file)
@@ -1288,7 +1288,7 @@ Return nil if no change in files."
                     nil t)
                    nil t)))
              ;; We found an uncompression rule.
-             (let ((match (string-match " " command))
+             (let ((match (string-search " " command))
                    (msg (concat "Uncompressing " file)))
                (unless (if match
                            (dired-check-process msg
index a990bd3fec3dca9c4a6a9e399f24a1bed3c663ed..380e47786fcbf4b4877220d9ba3903a013ccf654 100644 (file)
@@ -1044,11 +1044,11 @@ results in
           len2 (length file2))
     ;; Find common initial file name components:
     (let (next)
-      (while (and (setq next (string-match "/" file1 index))
+      (while (and (setq next (string-search "/" file1 index))
                   (< (setq next (1+ next)) (min len1 len2))
                   ;; For the comparison, both substrings must end in
                   ;; `/', so NEXT is *one plus* the result of the
-                  ;; string-match.
+                  ;; string-search.
                   ;; E.g., consider the case of linking "/tmp/a/abc"
                   ;; to "/tmp/abc" erroneously giving "/tmp/a" instead
                   ;; of "/tmp/" as common initial component
@@ -1066,7 +1066,7 @@ results in
             (start 0)
             (count 0))
         ;; Count number of slashes we must compensate for ...
-        (while (setq start (string-match "/" tem start))
+        (while (setq start (string-search "/" tem start))
           (setq count (1+ count)
                 start (1+ start)))
         ;; ... and prepend a "../" for each slash found:
index 816b8b69881171af7e3f17c372259c56e3196f4d..ff822506bf1eb2f0592549d0d0c037033698e725 100644 (file)
@@ -2909,7 +2909,7 @@ dired-buffers."
                       (if (= (aref pattern (1+ set-start)) ?^)
                           (+ 3 set-start)
                         (+ 2 set-start)))
-                     (set-end (string-match-p "]" pattern set-cont))
+                     (set-end (string-search "]" pattern set-cont))
                      (set (substring pattern set-start (1+ set-end))))
                 (setq regexp (concat regexp set))
                 (setq matched-in-pattern (1+ set-end))))
index 255edd0f37170abf94dba547150cf0429c747d18..e0a533c637ade26a4106c96666f5f4cfd50b4b63 100644 (file)
@@ -86,7 +86,7 @@ sure to obey the 8.3 limitations."
            ;; close to the beginning, change that to a period.  This
            ;; is so we could salvage more characters of the original
            ;; name by pushing them into the extension.
-           (if (and (not (string-match "\\." string))
+           (if (and (not (string-search "." string))
                     (> (length string) 8)
                     ;; We don't gain anything if we put the period closer
                     ;; than 5 chars from the beginning (5 + 3 = 8).
@@ -100,21 +100,21 @@ sure to obey the 8.3 limitations."
            ;; If we don't have a period in the first 8 chars, insert one.
            ;; This enables having 3 more characters from the original
            ;; name in the extension.
-           (if (> (or (string-match "\\." string) (length string))
+           (if (> (or (string-search "." string) (length string))
                   8)
                (setq string
                      (concat (substring string 0 8)
                              "."
                              (substring string 8))))
-           (setq firstdot (or (string-match "\\." string)
+           (setq firstdot (or (string-search "." string)
                               (1- (length string))))
            ;; Truncate to 3 chars after the first period.
            (if (> (length string) (+ firstdot 4))
                (setq string (substring string 0 (+ firstdot 4))))
            ;; Change all periods except the first one into underscores.
            ;; (DOS doesn't allow more than one period.)
-           (while (string-match "\\." string (1+ firstdot))
-             (setq i (string-match "\\." string (1+ firstdot)))
+           (while (string-search "." string (1+ firstdot))
+             (setq i (string-search "." string (1+ firstdot)))
              (aset string i ?_))
            ;; If the last character of the original filename was `~' or `#',
            ;; make sure the munged name ends with it also.  This is so that
@@ -160,7 +160,7 @@ sure to obey the 8.3 limitations."
               (strlen (length string))
               (lastchar (aref string (1- strlen)))
               firstdot)
-         (setq firstdot (string-match "\\." string))
+         (setq firstdot (string-search "." string))
          (cond
           (firstdot
            ;; Truncate the extension to 3 characters.
index 84de69a2ce1430726bd344f4f729e8986502108a..9e4a71c336eed7c40a8e3ec0327bd2b1cf7fdc2a 100644 (file)
@@ -559,7 +559,7 @@ doubt, use whitespace."
                           (or fkey key) " "))))
        (if prefix
            (setq desc (concat (edmacro-sanitize-for-string prefix) desc)))
-       (unless (string-match " " desc)
+       (unless (string-search " " desc)
          (let ((times 1) (pos bind-len))
            (while (not (cl-mismatch rest-mac rest-mac
                                     :start1 0 :end1 bind-len
index 08a6debc203725174d80d5d6316aa9f5ce65ef85..9c842f46829325f7818cbf4d0ae53d23fae9d18a 100644 (file)
@@ -323,7 +323,7 @@ current expansion depth."
 (defun eieio-sb-expand (text class indent)
   "For button TEXT, expand CLASS at the current location.
 Argument INDENT is the depth of indentation."
-  (cond ((string-match "\\+" text)     ;we have to expand this file
+  (cond ((string-search "+" text)      ;we have to expand this file
         (speedbar-change-expand-button-char ?-)
         (speedbar-with-writable
           (save-excursion
@@ -332,7 +332,7 @@ Argument INDENT is the depth of indentation."
               (while subclasses
                 (eieio-class-button (car subclasses) (1+ indent))
                 (setq subclasses (cdr subclasses)))))))
-       ((string-match "-" text)        ;we have to contract this node
+       ((string-search "-" text)       ;we have to contract this node
         (speedbar-change-expand-button-char ?+)
         (speedbar-delete-subblock indent))
        (t (error "Ooops...  not sure what to do")))
index 3f2a6537ab8e18510e18f446170057ff357fa224..86b22cad73bea502bc2b5df4acd43057be46d4fd 100644 (file)
@@ -344,14 +344,14 @@ The object is at indentation level INDENT."
 (defun eieio-speedbar-object-expand (text token indent)
   "Expand object represented by TEXT.
 TOKEN is the object.  INDENT is the current indentation level."
-  (cond ((string-match "\\+" text)     ;we have to expand this file
+  (cond ((string-search "+" text)      ;we have to expand this file
         (speedbar-change-expand-button-char ?-)
         (oset token expanded t)
         (speedbar-with-writable
           (save-excursion
             (end-of-line) (forward-char 1)
             (eieio-speedbar-expand token (1+ indent)))))
-       ((string-match "-" text)        ;we have to contract this node
+       ((string-search "-" text)       ;we have to contract this node
         (speedbar-change-expand-button-char ?+)
         (oset token expanded nil)
         (speedbar-delete-subblock indent))
index 83da495edf002b3aacdbc2c422268c930ccb84af..d6a6a5f044220fb8b7e3fe59d2e0354ed598f74a 100644 (file)
@@ -458,7 +458,7 @@ each line."
   "Return list of keywords given in file FILE."
   (let ((keywords (lm-keywords file)))
     (if keywords
-       (if (string-match-p "," keywords)
+       (if (string-search "," keywords)
            (split-string keywords ",[ \t\n]*" t "[ ]+")
          (split-string keywords "[ \t\n]+" t "[ ]+")))))
 
index 67de690e67d9913976c0151096cfb097d682a1be..36b275e2d3cff51ada43425955f4545fb2e6370d 100644 (file)
@@ -307,7 +307,7 @@ entirely by setting `warning-suppress-types' or
                                'type 'warning-suppress-log-warning
                                'warning-type type))
               (funcall newline)
-             (when (and warning-fill-prefix (not (string-match "\n" message)))
+             (when (and warning-fill-prefix (not (string-search "\n" message)))
                (let ((fill-prefix warning-fill-prefix)
                      (fill-column warning-fill-column))
                  (fill-region start (point))))
index 5b2fa048a09f680e152c9ae7b53b6045c8732976..55930e7e6bcdc18642618e88bf8d78f8d747ddff 100644 (file)
@@ -1100,7 +1100,7 @@ reversed."
       (setq viper-keep-reading-filename nil
            val (read-file-name (concat prompt str) nil default-directory))
       (setq val (expand-file-name val))
-      (if (and (string-match " " val)
+      (if (and (string-search " " val)
               (ex-cmd-accepts-multiple-files-p ex-token))
          (setq val (concat "\"" val "\"")))
       (setq str  (concat str (if (equal val "") "" " ")
@@ -2300,10 +2300,10 @@ Type `mak ' (including the space) to run make with no args."
 (defun ex-print-display-lines (lines)
   (cond
    ;; String doesn't contain a newline.
-   ((not (string-match "\n" lines))
+   ((not (string-search "\n" lines))
     (message "%s" lines))
    ;; String contains only one newline at the end.  Strip it off.
-   ((= (string-match "\n" lines) (1- (length lines)))
+   ((= (string-search "\n" lines) (1- (length lines)))
     (message "%s" (substring lines 0 -1)))
    ;; String spans more than one line.  Use a temporary buffer.
    (t
index 51247f1ff84c6b82e5e4b022e703ea7483a7cb7a..83f43d1006b98578958f64fba7230495348bd329 100644 (file)
@@ -44,7 +44,7 @@ If it is also not t, RET does not exit if it does non-null completion."
   (completing-read prompt
                   (mapcar (lambda (enventry)
                              (let ((str (substring enventry 0
-                                             (string-match "=" enventry))))
+                                             (string-search "=" enventry))))
                                (if (multibyte-string-p str)
                                    (decode-coding-string
                                     str locale-coding-system t)
@@ -184,7 +184,7 @@ a side-effect."
       (setq variable (encode-coding-string variable locale-coding-system)))
   (if (and value (multibyte-string-p value))
       (setq value (encode-coding-string value locale-coding-system)))
-  (if (string-match-p "=" variable)
+  (if (string-search "=" variable)
       (error "Environment variable name `%s' contains `='" variable))
   (if (string-equal "TZ" variable)
       (set-time-zone-rule value))
index bed0c065aea1c0f97445f849378a2e924b8f1271..b9dd437ed12da9e0b91f2e51ec8615d86f410afa 100644 (file)
@@ -219,7 +219,7 @@ If no one is selected, symmetric encryption will be performed.  "
                              (epa-mail--find-usable-key
                               (epg-list-keys
                                (epg-make-context epa-protocol)
-                               (if (string-match "@" recipient)
+                               (if (string-search "@" recipient)
                                    (concat "<" recipient ">")
                                  recipient))
                               'encrypt)))
index 36515ef4e5f0dce71ccea3efb3d9d969ed780709..9d6295594fddc0868aab169daf6a32de5f435d2d 100644 (file)
@@ -573,7 +573,7 @@ callback data (if any)."
                             "--status-fd" "1"
                             "--yes")
                       (if (and (not (eq (epg-context-protocol context) 'CMS))
-                               (string-match ":" (or agent-info "")))
+                               (string-search ":" (or agent-info "")))
                           '("--use-agent"))
                       (if (and (not (eq (epg-context-protocol context) 'CMS))
                                (epg-context-progress-callback context))
index 7a17ee233fda900b5af82c9ba051fdbf9a46d9b1..6d84665873ea23943dd90a718840b46258a64f1b 100644 (file)
@@ -950,15 +950,15 @@ PROCs `process-buffer' is `current-buffer' when this function is called."
   (unless (string= string "") ;; Ignore empty strings
     (save-match-data
       (let* ((tag-list (when (eq (aref string 0) ?@)
-                         (substring string 1 (string-match " " string))))
+                         (substring string 1 (string-search " " string))))
              (msg (make-erc-response :unparsed string :tags (when tag-list
                                                               (erc-parse-tags
                                                                tag-list))))
              (string (if tag-list
-                         (substring string (+ 1 (string-match " " string)))
+                         (substring string (+ 1 (string-search " " string)))
                        string))
              (posn (if (eq (aref string 0) ?:)
-                       (string-match " " string)
+                       (string-search " " string)
                      0)))
 
         (setf (erc-response.sender msg)
@@ -968,7 +968,7 @@ PROCs `process-buffer' is `current-buffer' when this function is called."
 
         (setf (erc-response.command msg)
               (let* ((bposn (string-match "[^ \n]" string posn))
-                     (eposn (string-match " " string bposn)))
+                     (eposn (string-search " " string bposn)))
                 (setq posn (and eposn
                                 (string-match "[^ \n]" string eposn)))
                 (substring string bposn eposn)))
@@ -976,7 +976,7 @@ PROCs `process-buffer' is `current-buffer' when this function is called."
         (while (and posn
                     (not (eq (aref string posn) ?:)))
           (push (let* ((bposn posn)
-                       (eposn (string-match " " string bposn)))
+                       (eposn (string-search " " string bposn)))
                   (setq posn (and eposn
                                   (string-match "[^ \n]" string eposn)))
                   (substring string bposn eposn))
index fcdb8df20328f16640020558020385c911093ad0..de72624aaa1d88d71d1c034cdaec6478f54511a7 100644 (file)
@@ -187,7 +187,7 @@ compared with `erc-nick-equal-p' which is IRC case-insensitive."
                             (plist-get elt prop)))
             ;; if the property exists and is equal, we continue, else, try the
             ;; next element of the list
-            (or (and (eq prop :nick) (string-match "!" val)
+            (or (and (eq prop :nick) (string-search "!" val)
                      test (string-equal test val))
                 (and (eq prop :nick)
                      test val
index bb85844523594a1a1a95b2247999c323286c9374..e61e741302d73a4a7d5edbc79fa6906f61794db7 100644 (file)
@@ -139,7 +139,7 @@ This will add a speedbar major display mode."
        t))))
 
 (defun erc-speedbar-expand-server (text server indent)
-  (cond ((string-match "\\+" text)
+  (cond ((string-search "+" text)
         (speedbar-change-expand-button-char ?-)
         (if (speedbar-with-writable
               (save-excursion
@@ -147,7 +147,7 @@ This will add a speedbar major display mode."
                 (erc-speedbar-channel-buttons nil (1+ indent) server)))
             (speedbar-change-expand-button-char ?-)
           (speedbar-change-expand-button-char ??)))
-       ((string-match "-" text)        ;we have to contract this node
+       ((string-search "-" text)       ;we have to contract this node
         (speedbar-change-expand-button-char ?+)
         (speedbar-delete-subblock indent))
        (t (error "Ooops... not sure what to do")))
@@ -184,7 +184,7 @@ This will add a speedbar major display mode."
   "For the line matching TEXT, in CHANNEL, expand or contract a line.
 INDENT is the current indentation level."
   (cond
-   ((string-match "\\+" text)
+   ((string-search "+" text)
     (speedbar-change-expand-button-char ?-)
     (speedbar-with-writable
      (save-excursion
@@ -233,7 +233,7 @@ INDENT is the current indentation level."
             (speedbar-with-writable
              (dolist (entry names)
                (erc-speedbar-insert-user entry ?+ (1+ indent))))))))))
-   ((string-match "-" text)
+   ((string-search "-" text)
     (speedbar-change-expand-button-char ?+)
     (speedbar-delete-subblock indent))
    (t (error "Ooops... not sure what to do")))
@@ -284,7 +284,7 @@ The update is only done when the channel is actually expanded already."
        (erc-speedbar-expand-channel "+" buffer 1)))))
 
 (defun erc-speedbar-expand-user (text token indent)
-  (cond ((string-match "\\+" text)
+  (cond ((string-search "+" text)
         (speedbar-change-expand-button-char ?-)
         (speedbar-with-writable
           (save-excursion
@@ -307,7 +307,7 @@ The update is only done when the channel is actually expanded already."
                  nil nil nil nil
                  info nil nil nil
                  (1+ indent)))))))
-       ((string-match "-" text)
+       ((string-search "-" text)
         (speedbar-change-expand-button-char ?+)
         (speedbar-delete-subblock indent))
        (t (error "Ooops... not sure what to do")))
index c66b03d2e4e83e10264ae9880f19e018737fdd69..73202016ba74e9b8480c48909e0dabf5ad8cfd09 100644 (file)
@@ -5587,7 +5587,7 @@ This returns non-nil only if we actually send anything."
       (when (and (erc-input-sendp state)
                 erc-send-this)
        (let ((string (erc-input-string state)))
-          (if (or (string-match "\n" string)
+          (if (or (string-search "\n" string)
                   (not (string-match erc-command-regexp string)))
               (mapc
                (lambda (line)
index 316094b17e471257e05fa6150a49f7f36a37df69..e36f2d0c7fe2d5a755100f6a92bd425737078acb 100644 (file)
@@ -291,7 +291,7 @@ the form:
     (let ((index 1))
       (setq incl glob)
       (while (and (eq incl glob)
-                 (setq index (string-match "~" glob index)))
+                 (setq index (string-search "~" glob index)))
        (if (or (get-text-property index 'escaped glob)
                (or (= (1+ index) len)))
            (setq index (1+ index))
index 96c9a60deabadc0528e6e0e1cd8b2fe55ef748b0..7a0b26a065884390e6b73689f2ba66d21138c0ac 100644 (file)
@@ -266,7 +266,7 @@ See `eshell-needs-pipe'."
        ;; neither 'first nor 'last?  See bug#1388 discussion.
        (catch 'found
         (dolist (exe eshell-needs-pipe)
-          (if (string-equal exe (if (string-match "/" exe)
+          (if (string-equal exe (if (string-search "/" exe)
                                     command
                                   (file-name-nondirectory command)))
               (throw 'found t))))))
index 30104816f078a2bfec92783d57584fcbf9ae7f1d..72de6b13e2e7328ff2473408f2b9182e736000e1 100644 (file)
@@ -204,7 +204,7 @@ then quoting is done by a backslash, rather than a doubled delimiter."
          string
        (if (eq (aref string (1- len)) ?\n)
            (setq string (substring string 0 (1- len))))
-       (if (string-match "\n" string)
+       (if (string-search "\n" string)
            (split-string string "\n")
          (if (and eshell-convert-numeric-arguments
                   (string-match
index 9fccc6b1c9d12c0ea60918e5e3b5addd3f908f6b..5dc6a193050d2b07e61af06aaacf5c9c19443b60 100644 (file)
@@ -381,7 +381,7 @@ This function is explicit for adding to `eshell-parse-argument-hook'."
 (defun eshell-envvar-names (&optional environment)
   "Return a list of currently visible environment variable names."
   (mapcar (lambda (x)
-            (substring x 0 (string-match "=" x)))
+            (substring x 0 (string-search "=" x)))
          (or environment process-environment)))
 
 (defun eshell-environment-variables ()
index 4bb3a2b00fca11a018dd94443ff8e70cc01e5711..a3a6f1b78ddea74f7b980ee7c6c39f24d511c1ae 100644 (file)
@@ -3062,7 +3062,7 @@ also the same size as FACE on FRAME, or fail."
       (let ((fonts (x-list-fonts pattern face frame 1)))
        (or fonts
            (if face
-               (if (string-match-p "\\*" pattern)
+               (if (string-search "*" pattern)
                    (if (null (face-font face))
                        (error "No matching fonts are the same height as the frame default font")
                      (error "No matching fonts are the same height as face `%s'" face))
index 9be9c2906eadf493426fca85bbf95be34c7ea2d1..0069af259749bf381a0f52a8a593fd3b31804e75 100644 (file)
@@ -1418,7 +1418,7 @@ which may actually result in an URL rather than a filename."
         (string (ffap-string-at-point)) ; uses mode alist
         (name
          (or (condition-case nil
-                 (and (not (string-match "//" string)) ; foo.com://bar
+                 (and (not (string-search "//" string)) ; foo.com://bar
                       (substitute-in-file-name string))
                (error nil))
              string))
index 54d0b919e1dea5230f64849fcc6f5b037f8a05c4..6c366177ce89dc36b6aa6fc18038e714fed58248 100644 (file)
@@ -6979,7 +6979,7 @@ by `sh' are supported."
                          (prog1        ; copy everything upto next `]'.
                              (substring wildcard
                                         i
-                                        (setq j (string-match
+                                        (setq j (string-search
                                                  "]" wildcard i)))
                            (setq i (if j (1- j) (1- len)))))))
                      ((eq ch ?.)  "\\.")
@@ -7105,7 +7105,7 @@ need to be passed verbatim to shell commands."
       ;; DOS/Windows don't allow `"' in file names.  So if the
       ;; argument has quotes, we can safely assume it is already
       ;; quoted by the caller.
-      (if (or (string-match "[\"]" pattern)
+      (if (or (string-search "\"" pattern)
              ;; We quote [&()#$`'] in case their shell is a port of a
              ;; Unixy shell.  We quote [,=+] because stock DOS and
              ;; Windows shells require that in some cases, such as
index 8696aea98eeebf5bc23b72fd03460d96af89f07c..46f4df9b6c4d09caee0fa3e6f4119d0a47eb952f 100644 (file)
@@ -1576,7 +1576,7 @@ As a side effect: sets `forms--the-record-list'."
        (forms--trans the-record "\n" forms-multi-line))
 
     ;; A final sanity check before updating.
-    (if (string-match-p "\n" the-record)
+    (if (string-search "\n" the-record)
        (error "Multi-line fields in this record - update refused"))
 
     (with-current-buffer forms--file-buffer
index e698d5401db61d5eafa586a7b62e1a914dc31f0f..6aa94f8be5abe95c06264b078cee91da6207697d 100644 (file)
@@ -636,7 +636,7 @@ see `frameset-filter-alist'."
       (not (frameset-switch-to-gui-p parameters))
       (let* ((prefix:p (symbol-name (car current)))
             (p (intern (substring prefix:p
-                                  (1+ (string-match-p ":" prefix:p)))))
+                                  (1+ (string-search ":" prefix:p)))))
             (val (cdr current))
             (found (assq p filtered)))
        (if (not found)
index d65e75e44c256bd5f9194f545844eedee00d3d47..3c1403e15514c13ca07dc57eb6e6809529915a40 100644 (file)
@@ -2519,7 +2519,7 @@ If PROMPT (the prefix), prompt for a coding system to use."
              format (and ctl (mail-content-type-get ctl 'format)))
        (when cte
          (setq cte (mail-header-strip-cte cte)))
-       (if (and ctl (not (string-match "/" (car ctl))))
+       (if (and ctl (not (string-search "/" (car ctl))))
            (setq ctl nil))
        (goto-char (point-max)))
       (forward-line 1)
index f73627a6480edf45435b1c34d4c2ac08af21c712..525823e72ce67a0c9e97a28e13c4a12b0a0b1846 100644 (file)
@@ -435,7 +435,7 @@ Returns the number of articles marked as read."
        ;; The "f:+" command marks everything *but* the matches as read,
        ;; so we simply first match everything as read, and then unmark
        ;; PATTERN later.
-       (when (string-match "\\+" commands)
+       (when (string-search "+" commands)
          (gnus-kill "from" ".")
          (setq commands "m"))
 
index 664027f0164aa25fbd877a3aa912398bfdcbc436..6adda2ed1478daa54260a32a7c9dbae56a272a04 100644 (file)
@@ -169,7 +169,7 @@ Calling (gnus-group-split-fancy nil nil \"mail.others\") returns:
        (when (not (null params))
          (let ((split-spec (assoc 'split-spec params)) group-clean)
            ;; Remove backend from group name
-           (setq group-clean (string-match ":" group))
+           (setq group-clean (string-search ":" group))
            (setq group-clean
                  (if group-clean
                      (substring group (1+ group-clean))
index db54237a76784cf85ce3dd6326691af97621f65f..ef89e6e9fcbd0a4dfe229d6cea3acc3548d423e3 100644 (file)
@@ -1323,7 +1323,7 @@ For the \"inline\" alternatives, also see the variable
            ((stringp self)
             (insert "Gcc: "
                     (encode-coding-string
-                     (if (string-match " " self)
+                     (if (string-search " " self)
                          (concat "\"" self "\"")
                        self)
                      (gnus-group-name-charset (gnus-inews-group-method self)
@@ -1681,7 +1681,7 @@ this is a reply."
               (gnus-group-find-parameter group 'gcc-self t)))
         (gcc-self-get (lambda (gcc-self-val group)
                         (if (stringp gcc-self-val)
-                            (if (string-match " " gcc-self-val)
+                            (if (string-search " " gcc-self-val)
                                 (concat "\"" gcc-self-val "\"")
                               gcc-self-val)
                           ;; In nndoc groups, we use the parent group name
@@ -1689,7 +1689,7 @@ this is a reply."
                           (let ((group (or (gnus-group-find-parameter
                                             gnus-newsgroup-name 'parent-group)
                                            group)))
-                            (if (string-match " " group)
+                            (if (string-search " " group)
                                 (concat "\"" group "\"")
                               group)))))
         result
@@ -1752,11 +1752,11 @@ this is a reply."
                  (gnus-delete-line)))
            ;; Use the list of groups.
            (while (setq name (pop groups))
-             (let ((str (if (string-match ":" name)
+             (let ((str (if (string-search ":" name)
                             name
                           (gnus-group-prefixed-name
                            name gnus-message-archive-method))))
-               (insert (if (string-match " " str)
+               (insert (if (string-search " " str)
                            (concat "\"" str "\"")
                          str)))
              (when groups
index 5697c8708889005aa927fe15b9acc3649da7f927..c135ecea369b2f0adb572bd8f475a17b2c4c9637 100644 (file)
@@ -44,7 +44,7 @@
                 (case-fold-search t)
                 (ct (message-fetch-field "Content-Type" t))
                 (ctl (and ct (mail-header-parse-content-type ct))))
-           (if (and ctl (not (string-match "/" (car ctl))))
+           (if (and ctl (not (string-search "/" (car ctl))))
                (setq ctl nil))
            (goto-char (point-max))
            (widen)
index 59b8efaa3acccb6b9241b18607e713ed5ddc96a4..2a8069d400c20f775f98ee4391e971d062e1e1c5 100644 (file)
@@ -1392,7 +1392,7 @@ Returns a list of [group article score] vectors."
                 (if (string-match-p "\\`[[:digit:]]+\\'" article)
                    (string-to-number article)
                  (nnmaildir-base-name-to-article-number
-                  (substring article 0 (string-match ":" article))
+                  (substring article 0 (string-search ":" article))
                   group (string-remove-prefix "nnmaildir:" server))))
           (when (and (numberp article)
                      (or (null groups)
@@ -2136,7 +2136,7 @@ article came from is also searched."
                  ;; If the value contains spaces, make sure it's
                  ;; quoted.
                  (when (and (memql status '(exact finished))
-                            (or (string-match-p " " str)
+                            (or (string-search " " str)
                                 in-string))
                    (unless (looking-at-p "\\s\"")
                      (insert "\""))
index cb60108ea9c272e0f2a4a97dd2045fba8ad89b70..59c6956ac2f8f03fe5e3b598518c7e8581d50904 100644 (file)
@@ -582,7 +582,7 @@ or to characters when given a pad value."
       ((string= fstring "")
        nil)
       ;; Not a format string.
-      ((not (string-match "%" fstring))
+      ((not (string-search "%" fstring))
        (list fstring))
       ;; A format string with just a single string spec.
       ((string= fstring "%s")
index dc004927b67fbb8365afd07ca3dbc3fa3a165938..856e95c0ba0e203f64395c63c48d3bb45216209e 100644 (file)
@@ -9199,7 +9199,7 @@ specified by the `gnus-refer-thread-limit' variable."
     (unless (string-match ">$" message-id)
       (setq message-id (concat message-id ">")))
     ;; People often post MIDs from URLs, so unhex it:
-    (unless (string-match "@" message-id)
+    (unless (string-search "@" message-id)
       (setq message-id (gnus-url-unhex-string message-id)))
     (let* ((header (gnus-id-to-header message-id))
           (sparse (and header
index 7a5e00c5ec926a76c5611698863f1a3cfb36849a..70ae81d95eaeda030160c0447f38b85dc3fd5ca8 100644 (file)
@@ -154,7 +154,7 @@ is slower."
        (and (string-match "(.+)" from)
             (setq name (substring from (1+ (match-beginning 0))
                                   (1- (match-end 0)))))
-       (and (string-match "()" from)
+       (and (string-search "()" from)
             (setq name address))
        ;; XOVER might not support folded From headers.
        (and (string-match "(.*" from)
@@ -265,7 +265,7 @@ If END is non-nil, use the end of the span instead."
 (defun gnus-newsgroup-directory-form (newsgroup)
   "Make hierarchical directory name from NEWSGROUP name."
   (let* ((newsgroup (gnus-newsgroup-savable-name newsgroup))
-        (idx (string-match ":" newsgroup)))
+        (idx (string-search ":" newsgroup)))
     (concat
      (if idx (substring newsgroup 0 idx))
      (if idx "/")
index ceb2ebcdcb16aa22e7531d82dcf9cb38d3e7230b..6c926384c978eef27afe3200462fff0f7b3d53df 100644 (file)
@@ -1434,7 +1434,7 @@ When called interactively, prompt for REGEXP."
   "View FILE using the gnus-uu methods."
   (let ((action (gnus-uu-get-action file)))
     (gnus-execute-command
-     (if (string-match "%" action)
+     (if (string-search "%" action)
         (format action file)
        (concat action " " file))
      (eq gnus-view-pseudos 'not-confirm))))
index 8b93accccadab6ad397f8af12f806e41b45cd86f..d52bd26a2cb1cdf9deebcf446b37a4ad4f44fa12 100644 (file)
@@ -3526,7 +3526,7 @@ You should probably use `gnus-find-method-for-group' instead."
 
 (defun gnus-group-native-p (group)
   "Say whether the group is native or not."
-  (not (string-match ":" group)))
+  (not (string-search ":" group)))
 
 (defun gnus-group-secondary-p (group)
   "Say whether the group is secondary or not."
@@ -3742,13 +3742,13 @@ just the host name."
     ;; Separate foreign select method from group name and collapse.
     ;; If method contains a server, collapse to non-domain server name,
     ;; otherwise collapse to select method.
-    (let* ((colon (string-match ":" group))
+    (let* ((colon (string-search ":" group))
           (server (and colon (substring group 0 colon)))
-          (plus (and server (string-match "\\+" server))))
+          (plus (and server (string-search "+" server))))
       (when server
        (if plus
            (setq foreign (substring server (+ 1 plus)
-                                    (string-match "\\." server))
+                                    (string-search "." server))
                  group (substring group (+ 1 colon)))
          (setq foreign server
                group (substring group (+ 1 colon))))
index a3ffaec3ff37c9b86b241bdd2c34aa127e33c27d..bff1b2a60d9b65428e17b209c511a4a14a20dd34 100644 (file)
@@ -5340,7 +5340,7 @@ Otherwise, generate and save a value for `canlock-password' first."
           (followup-to (message-fetch-field "followup-to"))
           to)
        (when (and newsgroups
-                 (string-match "," newsgroups)
+                 (string-search "," newsgroups)
                  (not followup-to)
                  (not
                   (zerop
@@ -5371,11 +5371,11 @@ Otherwise, generate and save a value for `canlock-password' first."
            (message-id (message-fetch-field "message-id" t)))
        (or (not message-id)
           ;; Is there an @ in the ID?
-          (and (string-match "@" message-id)
+          (and (string-search "@" message-id)
                ;; Is there a dot in the ID?
                (string-match "@[^.]*\\." message-id)
                ;; Does the ID end with a dot?
-               (not (string-match "\\.>" message-id)))
+               (not (string-search ".>" message-id)))
           (y-or-n-p
            (format "The Message-ID looks strange: \"%s\".  Really post? "
                    message-id)))))
@@ -5497,8 +5497,8 @@ Otherwise, generate and save a value for `canlock-password' first."
                   "@[^\\.]*\\."
                   (setq ad (nth 1 (mail-extract-address-components
                                    from))))) ;larsi@ifi
-            (string-match "\\.\\." ad) ;larsi@ifi..uio
-            (string-match "@\\." ad)   ;larsi@.ifi.uio
+            (string-search ".." ad)    ;larsi@ifi..uio
+            (string-search "@." ad)    ;larsi@.ifi.uio
             (string-match "\\.$" ad)   ;larsi@ifi.uio.
             (not (string-match "^[^@]+@[^@]+$" ad)) ;larsi.ifi.uio
             (string-match "(.*).*(.*)" from)) ;(lars) (lars)
@@ -5523,7 +5523,7 @@ Otherwise, generate and save a value for `canlock-password' first."
        (cond
        ((not reply-to)
         t)
-       ((string-match "," reply-to)
+       ((string-search "," reply-to)
         (y-or-n-p
          (format "Multiple Reply-To addresses: \"%s\". Really post? "
                  reply-to)))
@@ -5531,8 +5531,8 @@ Otherwise, generate and save a value for `canlock-password' first."
                   "@[^\\.]*\\."
                   (setq ad (nth 1 (mail-extract-address-components
                                    reply-to))))) ;larsi@ifi
-            (string-match "\\.\\." ad) ;larsi@ifi..uio
-            (string-match "@\\." ad)   ;larsi@.ifi.uio
+            (string-search ".." ad)    ;larsi@ifi..uio
+            (string-search "@." ad)    ;larsi@.ifi.uio
             (string-match "\\.$" ad)   ;larsi@ifi.uio.
             (not (string-match "^[^@]+@[^@]+$" ad)) ;larsi.ifi.uio
             (string-match "(.*).*(.*)" reply-to)) ;(lars) (lars)
@@ -5806,7 +5806,7 @@ In posting styles use `(\"Expires\" (make-expires-date 30))'."
                             (mail-header-subject message-reply-headers))
                            (message-strip-subject-re psubject))))
                 (and psupersedes
-                     (string-match "_-_@" psupersedes)))
+                     (string-search "_-_@" psupersedes)))
                "_-_" ""))
          "@" (message-make-fqdn) ">"))
 
@@ -6022,7 +6022,7 @@ give as trustworthy answer as possible."
   "Return the pertinent part of `user-mail-address'."
   (when (and user-mail-address
             (string-match "@.*\\." user-mail-address))
-    (if (string-match " " user-mail-address)
+    (if (string-search " " user-mail-address)
        (nth 1 (mail-extract-address-components user-mail-address))
       user-mail-address)))
 
@@ -6053,7 +6053,7 @@ give as trustworthy answer as possible."
       message-user-fqdn)
      ;; A system name without any dots is unlikely to be a good fully
      ;; qualified domain name.
-     ((and (string-match "[.]" sysname)
+     ((and (string-search "." sysname)
           (not (string-match message-bogus-system-names sysname)))
       ;; `system-name' returned the right result.
       sysname)
@@ -7053,7 +7053,7 @@ article, it has the value of
 
 " mft "
 
-which directs your response to " (if (string-match "," mft)
+which directs your response to " (if (string-search "," mft)
                                     "the specified addresses"
                                   "that address only") ".
 
@@ -7357,7 +7357,7 @@ want to get rid of this query permanently."))
 You should normally obey the Followup-To: header.
 
        `Followup-To: " followup-to "'
-directs your response to " (if (string-match "," followup-to)
+directs your response to " (if (string-search "," followup-to)
                               "the specified newsgroups"
                             "that newsgroup only") ".
 
index 02cd6af0c98263b51e51524c183196780ddcd96c..82d1de25f3d53dcc254251b09b52a331de8e0a17 100644 (file)
@@ -649,7 +649,7 @@ MIME-Version header before proceeding."
              (setq description (mail-decode-encoded-word-string
                                 description)))))
       (if (or (not ctl)
-             (not (string-match "/" (car ctl))))
+             (not (string-search "/" (car ctl))))
          (mm-dissect-singlepart
           (list mm-dissect-default-type)
           (and cte (intern (downcase (mail-header-strip-cte cte))))
index 708887cb9c78170c89680fd090ff99e897d041df..c35e89289a2e88b6c293f25294db389c88ad0a1c 100644 (file)
@@ -803,7 +803,7 @@ If FORMAT isn't a format string, it and all ARGS will be inserted
 without formatting."
   (with-current-buffer nntp-server-buffer
     (erase-buffer)
-    (if (string-match "%" format)
+    (if (string-search "%" format)
        (insert (apply #'format format args))
       (apply #'insert format args))
     t))
index 3cf65453f3b4453a8d7b21d9459ccffb1b593ec8..8a48cd87dba67729133e7accca8604b0f2ea8565 100644 (file)
@@ -1299,7 +1299,7 @@ If LIMIT, first try to limit the search to the N last articles."
   (when (and (nnimap-greeting nnimap-object)
             (string-match greeting-match (nnimap-greeting nnimap-object))
             (eq type 'append)
-            (string-match "\000" data))
+            (string-search "\000" data))
     (let ((choice (gnus-multiple-choice
                   "Message contains NUL characters.  Delete, continue, abort? "
                   '((?d "Delete NUL characters")
@@ -1761,7 +1761,7 @@ If LIMIT, first try to limit the search to the N last articles."
     (let ((result nil))
       (dolist (elem (split-string irange ","))
        (push
-        (if (string-match ":" elem)
+        (if (string-search ":" elem)
             (let ((numbers (split-string elem ":")))
               (cons (string-to-number (car numbers))
                     (string-to-number (cadr numbers))))
index 372df64e2e5ea385458143b8d2c71e538f7796b4..171f0813b38a6a8cd42ec393d1161543ccee969c 100644 (file)
@@ -87,7 +87,7 @@ See `nnmaildir-flag-mark-mapping'."
 
 (defun nnmaildir--ensure-suffix (filename)
   "Ensure that FILENAME contains the suffix \":2,\"."
-  (if (string-match-p ":2," filename)
+  (if (string-search ":2," filename)
       filename
     (concat filename ":2,")))
 
index c6aaf460ece644657ac36503fca85024d15ade50..92944887f44be1b07a8f9feca76d344c5b5ef753 100644 (file)
@@ -1629,7 +1629,7 @@ SERVER."
   (while (string-match "[<>]" mid)
     (setq mid (replace-match "" t t mid)))
   ;; mairix somehow does not like '$' in message-id
-  (when (string-match "\\$" mid)
+  (when (string-search "$" mid)
     (setq mid (concat mid "=")))
   (while (string-match "\\$" mid)
     (setq mid (replace-match "=," t t mid)))
index 8cd8cbe84f15cec506143422bf62bffa103dc3a8..0f12ee0e9d29809c520d0db28bff575c9b097cb5 100644 (file)
@@ -849,7 +849,7 @@ DATA should be the output of `xml-parse-region'."
 
 (defmacro nnrss-match-macro (base-uri item onsite-list offsite-list)
   `(cond ((or (string-match (concat "^" ,base-uri) ,item)
-             (not (string-match "://" ,item)))
+             (not (string-search "://" ,item)))
          (setq ,onsite-list (append ,onsite-list (list ,item))))
         (t (setq ,offsite-list (append ,offsite-list (list ,item))))))
 
index 1fd2ed06eba38c36dad12dc1a0784cc8557e34c9..615a3c931bf75de86f5844aa222914f30adcd4b2 100644 (file)
@@ -1697,7 +1697,7 @@ If SEND-IF-FORCE, only send authinfo to the server if the
                   ;; article comes from that group, I'd say.
                   ((and (setq newsgroups
                               (mail-fetch-field "newsgroups"))
-                        (not (string-match "," newsgroups)))
+                        (not (string-search "," newsgroups)))
                    newsgroups)
                   ;; If there is more than one group in the
                   ;; Newsgroups header, then the Xref header should
@@ -1725,7 +1725,7 @@ If SEND-IF-FORCE, only send authinfo to the server if the
                  number (string-to-number (match-string 2 xref))))
           ((and (setq newsgroups
                       (mail-fetch-field "newsgroups"))
-                (not (string-match "," newsgroups)))
+                (not (string-search "," newsgroups)))
            (setq group newsgroups))
           (group)
           (t (setq group ""))))
index d7fb038f45acd86eca438a25e1530409917313ef..2c7956d96804618888188d69ccf5a187739c807c 100644 (file)
@@ -154,7 +154,7 @@ with the current prefix.  The files are chosen according to
   (mapcar (lambda (c)
             (let* ((s (intern c))
                    (doc (condition-case nil (documentation s) (error nil)))
-                   (doc (and doc (substring doc 0 (string-match "\n" doc)))))
+                   (doc (and doc (substring doc 0 (string-search "\n" doc)))))
               (list c (propertize
                        (format "%-4s" (help--symbol-class s))
                        'face 'completions-annotations)
index ba27fc5810f55e9575da952280ad2bb05dc3c14c..29ae3404813a45ccce36834acb9ad4832dc09ff8 100644 (file)
@@ -1912,7 +1912,7 @@ the same names as used in the original source code, when possible."
                            (let ((name (symbol-name arg)))
                              (if (eq (aref name 0) ?&)
                                  (memq arg '(&rest &optional))
-                               (not (string-match "\\." name)))))
+                               (not (string-search "." name)))))
                 (setq valid nil)))
             (when valid arglist)))
         (let* ((arity (func-arity def))
index cbb69b206d46bd3c4ce9d5c7cc6b2ef7bf159383..4fadbbe4180c241bf87d28f2425196d25a9d9618 100644 (file)
@@ -507,8 +507,8 @@ otherwise."
   "Try to slam together two parts of a file specification, system dependently."
   (cond ((null dir-part) name-part)
        ((eq system-type 'ms-dos)
-        (if (and (string-match "\\\\" dir-part)
-                 (not (string-match "/" dir-part))
+        (if (and (string-search "\\" dir-part)
+                 (not (string-search "/" dir-part))
                  (= (aref name-part (1- (length name-part))) ?/))
             (aset name-part (1- (length name-part)) ?\\))
         (concat dir-part name-part))
index b453061388f008cf13eaadd3df90a6f4d5b2a5bc..3b961989e3e095b770567f2336285091952608ab 100644 (file)
@@ -1902,7 +1902,7 @@ tree depth, as determined from FILE (a filename).
 START is the offset at which to start looking for the / character in FILE."
   ;;(message "hfy-relstub");;DBUG
   (let ((c ""))
-    (while (setq start (string-match "/" file start))
+    (while (setq start (string-search "/" file start))
       (setq start (1+ start)) (setq c (concat c "../")))
     c))
 
index ea5ff32b8d70312e76cd9693a5deb484d6a7f071..b81a9db5eb99ff83efea5cd0f8dabdd1c3940a34 100644 (file)
@@ -1770,7 +1770,7 @@ is enabled then some keybindings are changed in the keymap."
              (let ((l (length dirname)))
                (if (and max-width (> max-width 0) (> l max-width))
                    (let* ((s (substring dirname (- max-width)))
-                          (i (string-match "/" s)))
+                          (i (string-search "/" s)))
                      (concat "..." (if i (substring s i) s)))
                  dirname)))))
    (t prompt)))
@@ -2516,7 +2516,7 @@ If cursor is not at the end of the user input, move to end of input."
       ;; Do nothing
       )
      ((and (memq ido-cur-item '(file dir))
-          (string-match "[$]" ido-text))
+          (string-search "$" ido-text))
       (let ((evar (substitute-in-file-name (concat ido-current-directory ido-text))))
        (if (not (file-exists-p (file-name-directory evar)))
            (message "Expansion generates non-existing directory name")
@@ -3089,7 +3089,7 @@ If repeated, insert text from buffer instead."
          (setq ido-text-init word
                ido-try-merged-list nil
                ido-exit 'chdir))
-        ((string-match "/" word)
+        ((string-search "/" word)
          (setq ido-text-init (concat ido-current-directory word)
                ido-try-merged-list nil
                ido-exit 'chdir))
@@ -4559,7 +4559,7 @@ For details of keybindings, see `ido-find-file'."
            (setq try-single-dir-match t))))
 
         ((and (string-equal (substring contents -2 -1) "/")
-              (not (string-match "[$]" contents)))
+              (not (string-search "$" contents)))
          (ido-set-current-directory
           (cond
            ((= (length contents) 2)
@@ -4656,7 +4656,7 @@ For details of keybindings, see `ido-find-file'."
               (memq ido-cur-item '(file dir))
               (not (ido-is-root-directory))
               (> (length contents) 1)
-              (not (string-match "[$]" contents))
+              (not (string-search "$" contents))
               (not ido-directory-nonreadable)
               (not ido-directory-too-big))
          (ido-trace "merge?")
index 97bf1ac058c47116473e458edba740f5aac7bc8c..75d2e6692c0ad92b20c323c2aa31c87e9444e89a 100644 (file)
@@ -78,7 +78,7 @@ is a string, it should be a MIME format string like
                 (string-match image-converter-regexp source))
            (and data-p
                 (symbolp data-p)
-                (string-match "/" (symbol-name data-p))
+                (string-search "/" (symbol-name data-p))
                 (string-match
                  image-converter-regexp
                  (concat "foo." (image-converter--mime-type data-p)))))
index 538a017f3c0dfaa1d994cccbaa9f6c0abfe539a1..e2e3e30ca21929d3e157839583dda45c4766bee6 100644 (file)
@@ -547,7 +547,7 @@ the sources handy."
 
              ;; skip nodes with "%" as probably `format' strings such as in
              ;; info-look.el
-             (unless (string-match "%" node)
+             (unless (string-search "%" node)
 
                ;; "(emacs)" is the default manual for docstring hyperlinks,
                ;; per `help-make-xrefs'
index 1c477a7082f7f7c01fc8b4e905d3760c5259f5a7..3718a1eb83fecf10cce10a0bec72e714e7e48924 100644 (file)
@@ -2483,7 +2483,7 @@ Table of contents is created from the tree structure of menus."
                              (match-string-no-properties 1)))
                 (section "Top")
                 menu-items)
-           (when (and upnode (string-match "(" upnode)) (setq upnode nil))
+           (when (and upnode (string-search "(" upnode)) (setq upnode nil))
             (when (and (not (Info-index-node nodename file))
                        (re-search-forward "^\\* Menu:" bound t))
               (forward-line 1)
@@ -2616,7 +2616,7 @@ new buffer."
 
   (let (target i (str (concat "\\*note " (regexp-quote footnotename)))
               (case-fold-search t))
-    (while (setq i (string-match " " str i))
+    (while (setq i (string-search " " str i))
       (setq str (concat (substring str 0 i) "[ \t\n]+" (substring str (1+ i))))
       (setq i (+ i 6)))
     (save-excursion
@@ -2933,7 +2933,7 @@ last sub-node, if any; otherwise go \"up\" to the parent node."
   (let ((prevnode (Info-extract-pointer "prev[ious]*" t))
        (upnode (Info-extract-pointer "up" t))
        (case-fold-search t))
-    (cond ((and upnode (string-match "(" upnode))
+    (cond ((and upnode (string-search "(" upnode))
           (user-error "First node in file"))
          ((and upnode (or (null prevnode)
                           ;; Use string-equal, not equal,
@@ -3778,7 +3778,7 @@ Build a menu of the possible matches."
      "The following packages match the keyword ‘" nodename "’:\n\n")
     (insert "* Menu:\n\n")
     (let ((keywords
-          (mapcar #'intern (if (string-match-p "," nodename)
+          (mapcar #'intern (if (string-search "," nodename)
                               (split-string nodename ",[ \t\n]*" t)
                             (list nodename))))
          hits desc)
@@ -5244,7 +5244,7 @@ The INDENT level is ignored."
 TEXT is the text of the button we clicked on, a + or - item.
 TOKEN is data related to this node (NAME . FILE).
 INDENT is the current indentation depth."
-  (cond ((string-match "\\+" text)     ;we have to expand this file
+  (cond ((string-search "+" text)      ;we have to expand this file
         (speedbar-change-expand-button-char ?-)
         (if (speedbar-with-writable
              (save-excursion
@@ -5252,7 +5252,7 @@ INDENT is the current indentation depth."
                (Info-speedbar-hierarchy-buttons nil (1+ indent) token)))
             (speedbar-change-expand-button-char ?-)
           (speedbar-change-expand-button-char ??)))
-       ((string-match "-" text)        ;we have to contract this node
+       ((string-search "-" text)       ;we have to contract this node
         (speedbar-change-expand-button-char ?+)
         (speedbar-delete-subblock indent))
        (t (error "Ooops... not sure what to do")))
index 2d3cd25b4a47bd8e8bf2b3a2b6975c03946bd861..02169ceb689fe3250ce6431969b06da3328ea460 100644 (file)
@@ -905,13 +905,13 @@ The IGNORED argument is ignored."
                  (setq family "*-*")
                (if (symbolp family)
                    (setq family (symbol-name family)))
-               (or (string-match "-" family)
+               (or (string-search "-" family)
                    (setq family (concat "*-" family))))
              (if (not registry)
                  (setq registry "*-*")
                (if (symbolp registry)
                    (setq registry (symbol-name registry)))
-               (or (string-match "-" registry)
+               (or (string-search "-" registry)
                    (= (aref registry (1- (length registry))) ?*)
                    (setq registry (concat registry "*"))))
              (insert (format"\n    -%s-%s-%s-%s-%s-*-*-*-*-*-*-%s"
index b999eff662fae84df47f2936f331e999261f0ed9..121a4c542e7d8e362cc2990d14a1fbb61c094f8e 100644 (file)
@@ -29,7 +29,7 @@
 
 ;;;###autoload
 (defvar default-korean-keyboard
-   (purecopy (if (string-match "3" (or (getenv "HANGUL_KEYBOARD_TYPE") ""))
+   (purecopy (if (string-search "3" (or (getenv "HANGUL_KEYBOARD_TYPE") ""))
       "3"
     ""))
    "The kind of Korean keyboard for Korean (Hangul) input method.
index b0281d366cdb46c18f3ad255c43fd60fb31c83fe..c78f596d768c5ed78eaae96d773def30c87ad9da 100644 (file)
@@ -219,7 +219,7 @@ Linum mode is a buffer-local minor mode."
   ;; update overlays on deletions, and after newlines are inserted
   (when (or (= beg end)
             (= end (point-max))
-            (string-match-p "\n" (buffer-substring-no-properties beg end)))
+            (string-search "\n" (buffer-substring-no-properties beg end)))
     (linum-update-current)))
 
 (defun linum-after-scroll (win _start)
index 2d68357474399b113aefbdbd0c6f420b8d91ec20..b1682cf78a2ed67a1390e2f1d529d84df869a2ae 100644 (file)
@@ -236,7 +236,7 @@ If DECODE, the DISPLAY-NAME will have RFC2047 decoding performed
        (setq display-string (ietf-drums-get-comment string)))
       (if (not mailbox)
          (when (and display-string
-                    (string-match "@" display-string))
+                    (string-search "@" display-string))
            (cons
             (mapconcat #'identity (nreverse display-name) "")
             (ietf-drums-get-comment string)))
index bb1f8f13bac11ee8c2aae4afadf429c6e1009d8a..3eb3ccb93de14dd3462e007f4ba64c3e968ec4db 100644 (file)
@@ -252,7 +252,7 @@ comma-separated list, and return the pruned list."
       (setq cur-pos (string-match "[,\"]" destinations cur-pos))
       (if (and cur-pos (equal (match-string 0 destinations) "\""))
          ;; Search for matching quote.
-         (let ((next-pos (string-match "\"" destinations (1+ cur-pos))))
+         (let ((next-pos (string-search "\"" destinations (1+ cur-pos))))
            (if next-pos
                (setq cur-pos (1+ next-pos))
              ;; If the open-quote has no close-quote,
index 5b08713949f7e9378bb60ef54afc1f593895b973..c442913d28249a324e7627dce3ad3fccc9220fd5 100644 (file)
@@ -612,7 +612,7 @@ should not change this value.")
                 (setq next prev
                       prev nil)
               (if (or (< index limit)
-                      (<= (+ len (or (string-match "\n" tail)
+                      (<= (+ len (or (string-search "\n" tail)
                                      (length tail)))
                           rfc2047-encode-max-chars))
                   (setq prev next
@@ -1111,7 +1111,7 @@ strings are stripped."
   "Decode MIME-encoded STRING and return the result.
 If ADDRESS-MIME is non-nil, strip backslashes which precede characters
 other than `\"' and `\\' in quoted strings."
-  (if (string-match "=\\?" string)
+  (if (string-search "=?" string)
       (with-temp-buffer
        ;; We used to only call mm-enable-multibyte if `m' is non-nil,
        ;; but this can't be the right criterion.  Don't just revert this
index db34fd2cb9e783ad2280f0978651c352d21954f9..a398ce0e9cc8720a1ebc45f871d16203a5174f4a 100644 (file)
@@ -61,12 +61,12 @@ must never cause a Lisp error."
         ;; make it parsable.  Let's try...
         (error
          (let (mod)
-           (when (and (string-match "\\\\\"" string)
+           (when (and (string-search "\\\"" string)
                       (not (string-match "\\`\"\\|[^\\]\"" string)))
              (setq string (string-replace "\\\"" "\"" string)
                    mod t))
-           (when (and (string-match "\\\\(" string)
-                      (string-match "\\\\)" string)
+           (when (and (string-search "\\(" string)
+                      (string-search "\\)" string)
                       (not (string-match "\\`(\\|[^\\][()]" string)))
              (setq string (replace-regexp-in-string
                            "\\\\\\([()]\\)" "\\1" string)
index acbb5880b5ccc4058dc578deefc0f7b9aa9b2d17..58a8eb7a37008c8107e51ccc271e711ee9396807 100644 (file)
@@ -93,7 +93,7 @@ according to the choice made, and returns a symbol."
   "Set LABEL as present or absent according to STATE in message MSG.
 LABEL may be a symbol or string."
   (or (stringp label) (setq label (symbol-name label)))
-  (if (string-match "," label)
+  (if (string-search "," label)
       (error "More than one label specified"))
   (with-current-buffer rmail-buffer
     (rmail-maybe-set-message-counters)
index ac933b9706d043c5f19eb7771756d2ac1e6ed0db..9dd9573a9fc14f6769ed9dc983fc655f61bf8aa2 100644 (file)
@@ -759,7 +759,7 @@ the message being processed."
                ;; If there are multiple lines in FROM,
                ;; discard up to the last newline in it.
                (while (and (stringp from)
-                           (setq newline (string-match "\n" from)))
+                           (setq newline (string-search "\n" from)))
                  (setq from (substring from (1+ newline))))
               (if (or (null from)
                       (string-match
index 8e3927cdcf2a14e81b2c397a28916c021b5c1fe8..ec9f340db86d301cadab2b11e8e8bee3604111fe 100644 (file)
@@ -516,7 +516,7 @@ for `smtpmail-try-auth-method'.")
 
 (defun smtpmail-maybe-append-domain (recipient)
   (if (or (not smtpmail-sendto-domain)
-         (string-match "@" recipient))
+         (string-search "@" recipient))
       recipient
     (concat recipient "@" smtpmail-sendto-domain)))
 
@@ -700,7 +700,7 @@ Returns an error if the server cannot be contacted."
        (let ((parts (split-string user-mail-address "@")))
         (and (= (length parts) 2)
              ;; There's a dot in the domain name.
-             (string-match "\\." (cadr parts))
+             (string-search "." (cadr parts))
              user-mail-address))))
 
 (defun smtpmail-via-smtp (recipient smtpmail-text-buffer
index 9ebffef2e59bb5b66f5b65e00d9b4f53d1b27000..b07004de38c5a3066f1f65fc62b3743cad385ee8 100644 (file)
@@ -246,10 +246,10 @@ You might need to set `uce-mail-reader' before using this."
       (if reply-to
          (setq to (format "%s, %s" to (mail-strip-quoted-names reply-to))))
       (let (first-at-sign end-of-hostname sender-host)
-       (setq first-at-sign (string-match "@" to)
+       (setq first-at-sign (string-search "@" to)
              end-of-hostname (string-match "[ ,>]" to first-at-sign)
              sender-host (substring to first-at-sign end-of-hostname))
-       (if (string-match "\\." sender-host)
+       (if (string-search "." sender-host)
            (setq to (format "%s, postmaster%s, abuse%s"
                             to sender-host sender-host))))
       (setq mail-send-actions nil)
@@ -291,7 +291,7 @@ You might need to set `uce-mail-reader' before using this."
       (search-forward " ")
       (forward-char -1)
       ;; And add its postmaster to the list of addresses.
-      (if (string-match "\\." (buffer-substring temp (point)))
+      (if (string-search "." (buffer-substring temp (point)))
          (setq to (format "%s, postmaster@%s"
                           to (buffer-substring temp (point)))))
       ;; Also look at the message-id, it helps *very* often.
@@ -302,7 +302,7 @@ You might need to set `uce-mail-reader' before using this."
             (setq temp (point))
             (search-forward ">")
             (forward-char -1)
-            (if (string-match "\\." (buffer-substring temp (point)))
+            (if (string-search "." (buffer-substring temp (point)))
                 (setq to (format "%s, postmaster@%s"
                                  to (buffer-substring temp (point)))))))
       (when (eq uce-mail-reader 'gnus)
index 54b6ffe983610b14978e6a56333ecc4b4b6d3251..6009a31919884fd41f529e35339b9462b6d26437 100644 (file)
@@ -801,7 +801,7 @@ POS defaults to `point'."
           ;; doesn't include a hyphen, we consider the hyphen to be
           ;; added by troff, and remove it.
           (or (not (eq (string-to-char (substring 1st-part -1)) ?-))
-              (string-match-p "-" (substring 1st-part 0 -1))
+              (string-search "-" (substring 1st-part 0 -1))
               (setq word (string-replace "-" "" word))))
        ;; Make sure the section number gets included by the code below.
        (goto-char (match-end 1)))
index 415e9848258f5d7b1115ef65f6125f17912af4c1..37fdb166011c582a72e9ef09bcb5d49ae95eb5cb 100644 (file)
@@ -111,10 +111,10 @@ COMMA-SEPARATOR is non-nil."
              (string-match "^\\([^,]+\\)," res))
         (setq res (match-string 1 res)))
     ;; Replace "&" with capitalized username
-    (if (string-match "&" res)
+    (if (string-search "&" res)
         (setq res (mh-replace-regexp-in-string "&" (capitalize username) res)))
     ;; Remove " character
-    (if (string-match "\"" res)
+    (if (string-search "\"" res)
         (setq res (mh-replace-regexp-in-string "\"" "" res)))
     ;; If empty string, use username instead
     (if (string-equal "" res)
@@ -285,7 +285,7 @@ Blind aliases or users from /etc/passwd are not expanded."
             (message "%s -> %s" the-name (mh-alias-expand the-name))
           ;; Check if it was a single word likely to be an alias
           (if (and (equal mh-alias-flash-on-comma 1)
-                   (not (string-match " " the-name)))
+                   (not (string-search " " the-name)))
               (message "No alias for %s" the-name))))))
   (self-insert-command 1))
 
index b64bbfb6f3bffd1770ce38da16c6d4cc23c0d9d1..4fae69defaf8002568a9f91e3e74b9a7f62defb9 100644 (file)
@@ -637,8 +637,8 @@ See also `mh-compose-forward-as-mime-flag',
 (defun mh-forwarded-letter-subject (from subject)
   "Return a Subject suitable for a forwarded message.
 Original message has headers FROM and SUBJECT."
-  (let ((addr-start (string-match "<" from))
-        (comment (string-match "(" from)))
+  (let ((addr-start (string-search "<" from))
+        (comment (string-search "(" from)))
     (cond ((and addr-start (> addr-start 0))
            ;; Full Name <luser@host>
            (setq from (substring from 0 (1- addr-start))))
index 3af840c3a31ee83a35ea557e60b27afd20ef7a7a..76ef990d8253ae0cd2117ec25a56153429c57506 100644 (file)
@@ -441,7 +441,7 @@ be handled next."
         (position 0)
         line-end line folder unseen total)
     (unwind-protect
-        (while (setq line-end (string-match "\n" output position))
+        (while (setq line-end (string-search "\n" output position))
           (setq line (format "%s%s"
                              mh-speed-partial-line
                              (substring output position line-end))
index 8e900dc01131b19251f0871df24f4b3e73e9f18b..bbce17013b1c7c56c6bd191bc8466cd8cb1b3db2 100644 (file)
@@ -378,7 +378,7 @@ names and the function is called when OUTPUT is available."
         (prevailing-match-data (match-data))
         line-end folder)
     (unwind-protect
-        (while (setq line-end (string-match "\n" output position))
+        (while (setq line-end (string-search "\n" output position))
           (setq folder (format "+%s%s"
                                mh-flists-partial-line
                                (substring output position line-end)))
@@ -702,7 +702,7 @@ See Info node `(elisp) Programmed Completion' for details."
                      (let ((slash (mh-search-from-end ?/ orig-name)))
                        (if slash (1+ slash)
                          (if (string-match "\\`\\+" orig-name) 1 0)))
-                     (if (cdr flag) (string-match "/" (cdr flag)))))
+                     (if (cdr flag) (string-search "/" (cdr flag)))))
           ((eq flag nil)
            (let ((try-res
                   (try-completion
index 2c6340e1c3e3a4a257d9abcf914f0e7391356224..9f327df28f5e0b120216a057548063c37b17b4b0 100644 (file)
@@ -2741,7 +2741,7 @@ Useful to give the user default values that won't be substituted."
 
 (defun completion--make-envvar-table ()
   (mapcar (lambda (enventry)
-            (substring enventry 0 (string-match-p "=" enventry)))
+            (substring enventry 0 (string-search "=" enventry)))
           process-environment))
 
 (defconst completion--embedded-envvar-re
@@ -2810,7 +2810,7 @@ same as `substitute-in-file-name'."
                                        pred action))
        ((eq (car-safe action) 'boundaries)
         (let ((start (length (file-name-directory string)))
-              (end (string-match-p "/" (cdr action))))
+              (end (string-search "/" (cdr action))))
           `(boundaries
             ;; if `string' is "C:" in w32, (file-name-directory string)
             ;; returns "C:/", so `start' is 3 rather than 2.
@@ -3988,7 +3988,7 @@ which is at the core of flex logic.  The extra
 
 (defun completion-flex-try-completion (string table pred point)
   "Try to flex-complete STRING in TABLE given PRED and POINT."
-  (unless (and completion-flex-nospace (string-match-p " " string))
+  (unless (and completion-flex-nospace (string-search " " string))
     (pcase-let ((`(,all ,pattern ,prefix ,suffix ,_carbounds)
                  (completion-substring--all-completions
                   string table pred point
@@ -4005,7 +4005,7 @@ which is at the core of flex logic.  The extra
 
 (defun completion-flex-all-completions (string table pred point)
   "Get flex-completions of STRING in TABLE, given PRED and POINT."
-  (unless (and completion-flex-nospace (string-match-p " " string))
+  (unless (and completion-flex-nospace (string-search " " string))
     (pcase-let ((`(,all ,pattern ,prefix ,_suffix ,_carbounds)
                  (completion-substring--all-completions
                   string table pred point
index e04ffa497470b61d1b69c94090e347a257ea5e2e..029f0ca8f4286272650d28465527d9ef62d6dc98 100644 (file)
@@ -305,7 +305,7 @@ defaults to 6600 and HOST defaults to localhost."
 (defun mpc--proc-quote-string (s)
   (if (numberp s) (number-to-string s)
     (setq s (replace-regexp-in-string "[\"\\]" "\\\\\\&" s))
-    (if (string-match " " s) (concat "\"" s "\"") s)))
+    (if (string-search " " s) (concat "\"" s "\"") s)))
 
 (defconst mpc--proc-alist-to-alists-starters '(file directory))
 
@@ -611,7 +611,7 @@ Any call to `mpc-status-refresh' may cause it to be restarted."
 
 (defun mpc-cmd-special-tag-p (tag)
   (or (memq tag '(Playlist Search Directory))
-      (string-match "|" (symbol-name tag))))
+      (string-search "|" (symbol-name tag))))
 
 (defun mpc-cmd-find (tag value)
   "Return a list of all songs whose tag TAG has value VALUE.
@@ -1438,7 +1438,7 @@ when constructing the set of constraints."
   (let (res)
     (dolist (constraint constraints)
       (when (or (eq (car constraint) buffer-tag)
-                (and (string-match "|" (symbol-name buffer-tag))
+                (and (string-search "|" (symbol-name buffer-tag))
                      (member (symbol-name (car constraint))
                              (split-string (symbol-name buffer-tag) "|"))))
         (setq res (cdr constraint))))
index 3f3a3df8e5577cabd8159d2799cfef47e049ebe2..e302aa89f30dec961c21cfbd8ccdc77aef4524aa 100644 (file)
@@ -2296,7 +2296,7 @@ and NOWAIT."
       ;; If the dir name contains a space, some ftp servers will
       ;; refuse to list it.  We instead change directory to the
       ;; directory in question and ls ".".
-      (when (string-match " " cmd1)
+      (when (string-search " " cmd1)
        ;; Keep the result.  In case of failure, we will (see below)
        ;; short-circuit CMD and return this result directly.
        (setq result (ange-ftp-cd host user (nth 1 cmd) 'noerror))
@@ -2881,13 +2881,13 @@ NO-ERROR, if a listing for DIRECTORY cannot be obtained."
       (or
        ;; No dots in dir names in vms.
        (and (eq host-type 'vms)
-           (string-match "\\." efile))
+           (string-search "." efile))
        ;; No subdirs in mts of cms.
        (and (memq host-type '(mts cms))
            (not (string-equal "/" (nth 2 parsed))))
        ;; No dots in pseudo-dir names in bs2000.
        (and (eq host-type 'bs2000)
-           (string-match "\\." efile))))))
+           (string-search "." efile))))))
 
 (defun ange-ftp-file-entry-p (name)
   "Given NAME, return whether there is a file entry for it."
index aeeb9bd8d3b7b4bd965dc0314702256941e1fb46..5473ba7e697865c211cf6a937894489ddfaf562e 100644 (file)
@@ -1075,7 +1075,7 @@ For instance, \"foo.png\" will result in \"image/png\"."
       (dolist (data mailcap--computed-mime-data)
         (dolist (info (cdr data))
           (setq type (cdr (assq 'type (cdr info))))
-          (unless (string-match-p "\\*" type)
+          (unless (string-search "*" type)
             (push type res))))
       (nreverse res)))))
 
index e1d35c2a85a6b715a39f59718656a7bb3f0b1552..727aa55de5831383187130b6880f128933e1f8e6 100644 (file)
@@ -422,7 +422,7 @@ with m:msgid of the current article and enabled threads."
     (while (string-match "[<>]" mid)
       (setq mid (replace-match "" t t mid)))
     ;; mairix somehow does not like '$' in message-id
-    (when (string-match "\\$" mid)
+    (when (string-search "$" mid)
       (setq mid (concat mid "=")))
     (while (string-match "\\$" mid)
       (setq mid (replace-match "=," t t mid)))
index cb49f75c81d5dccc7651e034d118e5b3572a9999..a267ac319b6e6014f0ff5222ffb074ecfc22b889 100644 (file)
@@ -551,8 +551,8 @@ Returns the process associated with the connection."
       (when result
        (let ((response (plist-get (cdr result) :greeting)))
          (setq pop3-timestamp
-               (substring response (or (string-match "<" response) 0)
-                          (+ 1 (or (string-match ">" response) -1)))))
+               (substring response (or (string-search "<" response) 0)
+                          (+ 1 (or (string-search ">" response) -1)))))
        (set-process-query-on-exit-flag (car result) nil)
        (erase-buffer)
        (car result)))))
index f5480afb69874b0e5ff1cd46cdb14e2308a10148..de1cd9d320f107896da7be2d086787026de4b99a 100644 (file)
@@ -1938,7 +1938,7 @@ This is a specialization of `soap-decode-type' for
                   (e-name (soap-xs-element-name element))
                   ;; Heuristic: guess if we need to decode using local
                   ;; namespaces.
-                  (use-fq-names (string-match ":" (symbol-name (car node))))
+                  (use-fq-names (string-search ":" (symbol-name (car node))))
                   (children (if e-name
                                 (if use-fq-names
                                     ;; Find relevant children
index 1da1d31d6785aa0e08c39d34c0d37454b2c11cf1..78a261fd83eaf25c0583cfdb414b10e85f5abbda 100644 (file)
       (setq version (process-get proc 'socks-server-protocol))
       (cond
        ((equal version 'http)
-       (if (not (string-match "\r\n\r\n" string))
+       (if (not (string-search "\r\n\r\n" string))
            nil                 ; Need to spin some more
          (process-put proc 'socks-state socks-state-connected)
          (process-put proc 'socks-reply 0)
index 6dca34a80f2be3f5825e0df737ef6af4155c8ad6..c265b19cf05d108c1ede598611caee9f398fd217 100644 (file)
@@ -633,7 +633,7 @@ non-transparent child section."
                                 tag-qnames))))
 
 (defun nxml-highlighted-qname (qname)
-  (let ((colon (string-match ":" qname)))
+  (let ((colon (string-search ":" qname)))
     (if colon
        (concat (propertize (substring qname 0 colon)
                            'face
index d820d1b99b5e0ffd1937784573cb05ffc834d8cf..dd3000773fde9ff427cf27d67e6ee15401e4740c 100644 (file)
@@ -179,7 +179,7 @@ Return a pattern."
     (setq rng-c-default-namespace rng-c-inherit-namespace)))
 
 (defun rng-c-expand-name (prefixed-name)
-  (let ((i (string-match ":" prefixed-name)))
+  (let ((i (string-search ":" prefixed-name)))
     (rng-make-name (rng-c-lookup-prefix (substring prefixed-name
                                                   0
                                                   i))
@@ -222,7 +222,7 @@ and URI is a symbol.")
     (cdr binding)))
 
 (defun rng-c-expand-datatype (prefixed-name)
-  (let ((i (string-match ":" prefixed-name)))
+  (let ((i (string-search ":" prefixed-name)))
     (rng-make-datatype
      (rng-c-lookup-datatype-prefix (substring prefixed-name 0 i))
      (substring prefixed-name (+ i 1)))))
index fda481fa281ff8ba2fea681f4eadaf493bc368bf..24f4d2ec4434da88e7c1fddf67e7cd2fc6d0c535 100644 (file)
@@ -93,7 +93,7 @@ Signal an error if URI is not a valid file URL."
       (rng-uri-error "`?' not escaped in file URI `%s'" uri))
     (when fragment-id
       (rng-uri-error "URI `%s' has a fragment identifier" uri))
-    (when (string-match ";" path)
+    (when (string-search ";" path)
       (rng-uri-error "`;' not escaped in URI `%s'" uri))
     (when (string-match "%2[fF]" path) ;; 2f is hex code of slash
       (rng-uri-error "Escaped slash in URI `%s'" uri))
@@ -110,7 +110,7 @@ Signal an error if URI is not a valid file URL."
                 (rng-uri-unescape-unibyte-replace path 2))
                (t
                 (rng-uri-unescape-unibyte path))))
-    (when (string-match "\000" path)
+    (when (string-search "\000" path)
       (rng-uri-error "URI `%s' has NUL character in path" uri))
     (when (eq pattern 'match)
       (setq path
index 1c1167db89bd1fc065248c750287c62268630dae..2d3be2dd9a460334b9e874ea24180350feb7b0fb 100644 (file)
@@ -243,7 +243,7 @@ second TAB brings up the `*Completions*' buffer."
   (when (and partial-completion-mode (null PC-env-vars-alist))
     (setq PC-env-vars-alist
           (mapcar (lambda (string)
-                    (let ((d (string-match "=" string)))
+                    (let ((d (string-search "=" string)))
                       (cons (concat "$" (substring string 0 d))
                             (and d (substring string (1+ d))))))
                   process-environment))))
@@ -575,7 +575,7 @@ GOTO-END is non-nil, however, it instead replaces up to END."
                  p (+ p (length PC-ndelims-regex) 1)))))
       (setq p 0)
       (if filename
-         (while (setq p (string-match "\\\\\\*" regex p))
+         (while (setq p (string-search "\\*" regex p))
            (setq regex (concat (substring regex 0 p)
                                "[^/]*"
                                (substring regex (+ p 2))))))
index 9676d6b28e99304ebc9ce9292602053b7a70ed64..9bf684568265e9e3fc71f70ca24b791ac3730638 100644 (file)
@@ -393,11 +393,11 @@ compatibility with `format-alist', and is ignored."
   "Return a copy of STRING with each soft newline replaced by a space.
 Hard newlines are left intact."
   (let* ((str (copy-sequence string))
-         (pos (string-match "\n" str)))
+         (pos (string-search "\n" str)))
     (while pos
       (if (null (get-text-property pos 'hard str))
           (aset str pos ? ))
-      (setq pos (string-match "\n" str (1+ pos))))
+      (setq pos (string-search "\n" str (1+ pos))))
     str))
 
 ;;; Auto wrap
index caeca98881045424dd16e1b96605f6562541ea7e..9aab1e7c9f5f48e7de5f4428bebc1aeba56ad63c 100644 (file)
@@ -509,7 +509,7 @@ construct the vector entries."
     (vector (gnus-group-full-name group server)
            (if (string-match "\\`nnmaildir:" (gnus-group-server server))
                (nnmaildir-base-name-to-article-number
-                (substring article 0 (string-match ":" article))
+                (substring article 0 (string-search ":" article))
                 group nil)
              (string-to-number article))
            (string-to-number score)))))
index dbfc79bf913283be33664228ac388c8c45a8798d..0167a00066b5abeab1a4a999127e54582f29b8cb 100644 (file)
@@ -1222,7 +1222,7 @@ of the terminal-emulator"
   (cond ((string-match "\\`[-a-zA-Z0-9+=_.@/:]+\\'"
                       string)
         string)
-       ((not (string-match "[$]" string))
+       ((not (string-search "$" string))
         ;; "[\"\\]" are special to sh and the lisp reader in the same way
         (prin1-to-string string))
        (t
index 1340618f055c6b1d313c53363c644e67ea83105d..e0e89c390ea470a1244cfc6b64cf8b58b50168c2 100644 (file)
@@ -1415,9 +1415,9 @@ If an argument is specified, don't set the search direction."
   ;; if using regexp, eliminate upper case forms (\B \W \S.)
   (if tpu-regexp-p
       (let ((pat (copy-sequence string)) (case-fold-search nil) (pos 0))
-       (while (setq pos (string-match "\\\\\\\\" pat)) (aset pat (+ 1 pos) ?.))
-       (while (setq pos (string-match "\\\\B" pat)) (aset pat (+ 1 pos) ?.))
-       (while (setq pos (string-match "\\\\W" pat)) (aset pat (+ 1 pos) ?.))
+       (while (setq pos (string-search "\\\\" pat)) (aset pat (+ 1 pos) ?.))
+       (while (setq pos (string-search "\\B" pat)) (aset pat (+ 1 pos) ?.))
+       (while (setq pos (string-search "\\W" pat)) (aset pat (+ 1 pos) ?.))
        (while (setq pos (string-match "\\\\S." pat))
          (aset pat (+ 1 pos) ?.) (aset pat (+ 2 pos) ?.))
        (string-equal pat (downcase pat)))
index b62ad82999047fd8cf4493c4ce04021bcf4c78e2..6cd6693fc4333015aa2ce4077a4c097b942caacf 100644 (file)
@@ -31,7 +31,7 @@
 
 ;;;###autoload
 (defun isPlainHostName (host)
-  (not (string-match "\\." host)))
+  (not (string-search "." host)))
 
 ;;;###autoload
 (defun dnsDomainIs (host dom)
index e1d104f74fff37a15d0f045c3f3a6467cbf02e9f..49dc2d2fc6ce4fc96ea6a2b545082bcb713f4e49 100644 (file)
@@ -214,7 +214,7 @@ Includes files as well as host names followed by a colon."
                           (list string)
                         (completion-table-subvert (pcomplete-all-entries)
                                                    "" "/ssh:")))
-                      ((string-match "/" string) ; Local file name.
+                      ((string-search "/" string) ; Local file name.
                        (pcomplete-all-entries))
                       (t                ;Host name or local file name.
                        (append (all-completions string (pcomplete-all-entries))
index 3bb8bf0c82bb5b2819315be43d65e8e0c92c13ba..9d5ee2619768530ccb18f1e5656050950d163ec3 100644 (file)
@@ -2170,7 +2170,7 @@ other words."
   (let (pos ret-list end-pos)
     (setq pos 0)
     (setq ret-list nil)
-    (while (setq end-pos (string-match " " (substring strin pos)))
+    (while (setq end-pos (string-search " " (substring strin pos)))
       (setq end-pos (+ end-pos pos))
       (if (not (= end-pos pos))
          (setq ret-list (append ret-list (list
@@ -2269,7 +2269,7 @@ except for the verb."
        startlist
       (if (string= (substring dirstring 0 1) "/")
          (dun-get-path (substring dirstring 1) (append startlist (list "/")))
-       (if (not (setq slash (string-match "/" dirstring)))
+       (if (not (setq slash (string-search "/" dirstring)))
            (append startlist (list dirstring))
          (dun-get-path (substring dirstring (1+ slash))
                    (append startlist
@@ -2348,7 +2348,7 @@ Also prints current score to let user know he has scored."
          (princ dun-line)
          (if (eq (dun-parse2 nil dun-unix-verbs dun-line) -1)
              (progn
-               (if (setq esign (string-match "=" dun-line))
+               (if (setq esign (string-search "=" dun-line))
                    (dun-doassign dun-line esign)
                  (dun-mprinc (car dun-line-list))
                  (dun-mprincl ": not found.")))))
@@ -2380,21 +2380,21 @@ Also prints current score to let user know he has scored."
            (dun-mprinc line)
            (dun-mprincl " : not found."))
 
-       (if (not (setq epoint (string-match ")" line)))
+       (if (not (setq epoint (string-search ")" line)))
            (if (string= (substring line (1+ esign) (+ esign 2))
                         "\"")
                (progn
                  (setq afterq (substring line (+ esign 2)))
                  (setq epoint (+
-                               (string-match "\"" afterq)
+                               (string-search "\"" afterq)
                                (+ esign 3))))
 
-             (if (not (setq epoint (string-match " " line)))
+             (if (not (setq epoint (string-search " " line)))
                  (setq epoint (length line))))
          (setq epoint (1+ epoint))
          (while (and
                  (not (= epoint (length line)))
-                 (setq i (string-match ")" (substring line epoint))))
+                 (setq i (string-search ")" (substring line epoint))))
            (setq epoint (+ epoint i 1))))
        (setq value (substring line (1+ esign) epoint))
        (dun-eval varname value)))))
@@ -2788,7 +2788,7 @@ drwxr-xr-x  3 root     staff          2048 Jan 1 1970 ..")
   (cond
    ((null (setq args (car args)))
     (dun-mprincl "Usage: cat <ascii-file-name>"))
-   ((string-match-p "/" args)
+   ((string-search "/" args)
     (dun-mprincl "cat: only files in current directory allowed."))
    ((and (> dun-cdroom 0) (string= args "description"))
     (dun-mprincl (car (nth dun-cdroom dun-rooms))))
@@ -3110,7 +3110,7 @@ File not found")))
            (setq dun-line (downcase (dun-read-line)))
            (if (eq (dun-parse2 nil dun-unix-verbs dun-line) -1)
                (let (esign)
-                 (if (setq esign (string-match "=" dun-line))
+                 (if (setq esign (string-search "=" dun-line))
                      (dun-doassign dun-line esign)
                    (dun-mprinc (car dun-line-list))
                    (dun-mprincl ": not found.")))))
index a00440d898cfcbbdbd7f61e2af44bd4fc7e64a75..884104a16f7adeac44f42c38e18a872718d05cf2 100644 (file)
@@ -4337,7 +4337,7 @@ end
   (let ((len   (1- (length str)))
        (index 0)
        new start fmt)
-    (while (setq start (string-match "%" str index))
+    (while (setq start (string-search "%" str index))
       (setq fmt   (if (< start len) (aref str (1+ start)) ?\?)
            new   (concat new
                          (substring str index start)
index 97596d0d27885eec10ceff3325f0fcfa71286355..67ad39b7f46e7a2a3d6fb600e94d446d905d5894 100644 (file)
@@ -1382,7 +1382,7 @@ With arg, enter name of variable to be watched in the minibuffer."
     (string-match "\\(\\S-+\\)" text)
     (let* ((var (nth (- (count-lines (point-min) (point)) 2) gdb-var-list))
            (varnum (car var)))
-      (if (string-match "\\." (car var))
+      (if (string-search "." (car var))
           (message-box "Can only delete a root expression")
         (gdb-var-delete-1 var varnum)))))
 
@@ -1479,14 +1479,14 @@ With arg, enter name of variable to be watched in the minibuffer."
 TEXT is the text of the button we clicked on, a + or - item.
 TOKEN is data related to this node.
 INDENT is the current indentation depth."
-  (cond ((string-match "\\+" text)        ;expand this node
+  (cond ((string-search "+" text)        ;expand this node
         (let* ((var (assoc token gdb-var-list))
                (expr (nth 1 var)) (children (nth 2 var)))
           (if (or (<= (string-to-number children) gdb-max-children)
                   (y-or-n-p
                    (format "%s has %s children. Continue? " expr children)))
               (gdb-var-list-children token))))
-       ((string-match "-" text)        ;contract this node
+       ((string-search "-" text)       ;contract this node
         (dolist (var gdb-var-list)
           (if (string-match (concat token "\\.") (car var))
               (setq gdb-var-list (delq var gdb-var-list))))
@@ -2416,7 +2416,7 @@ rule from an incomplete data stream.  The parser will stay in this state until
 the end of the current result or async record is reached."
   (when (< gdbmi-bnf-offset (length gud-marker-acc))
     ;; Search the data stream for the end of the current record:
-    (let* ((newline-pos (string-match "\n" gud-marker-acc gdbmi-bnf-offset))
+    (let* ((newline-pos (string-search "\n" gud-marker-acc gdbmi-bnf-offset))
           (is-progressive (equal (cdr class-command) 'progressive))
        (is-complete (not (null newline-pos)))
        result-str)
index 05ad82acc4a40cb2c9170656eec77db43db84dce..08814ebcaaac65d2460006dc7b7ab57f486fb863 100644 (file)
@@ -3150,7 +3150,7 @@ Obeying it means displaying in another window the specified file and line."
                  (buffer-substring (region-beginning) (region-end))
                (apply gud-find-expr-function args))))
     (save-match-data
-      (if (string-match "\n" expr)
+      (if (string-search "\n" expr)
          (error "Expression must not include a newline"))
       (with-current-buffer gud-comint-buffer
        (save-excursion
index db76df96a567e760253a3e7669e4933e98988598..c53b9a4775c769f28b20482738da7c969569f1e3 100644 (file)
@@ -495,7 +495,7 @@ It collects and prints the diagnostics messages."
        ((and (memq cw '(function-keyword procedure-keyword))
             (stringp this-word)
             (string-match "\\S-" this-word)
-            (not (string-match "!" this-word)))
+            (not (string-search "!" this-word)))
        (cond ((or (= (char-before beg) ?/)
                   (save-excursion (goto-char end)
                                   (looking-at "[ \t]*=")))
index ad8feb988f5060c5456245ec4708992a2c7bfe9a..eb88f25dfd68daffcf781adb3b40536d2d476672 100644 (file)
@@ -967,7 +967,7 @@ IDL has currently stepped.")
     ;; Strip those pesky ctrl-m's.
     (add-hook 'comint-output-filter-functions
              (lambda (string)
-               (when (string-match "\r" string)
+               (when (string-search "\r" string)
                  (let ((pmark (process-mark (get-buffer-process
                                              (current-buffer)))))
                    (save-excursion
@@ -1409,7 +1409,7 @@ Remove everything to the first newline, and all lines with % in front
 of them, with optional follow-on lines starting with two spaces.  This
 works well enough, since any print output typically arrives before
 error messages, etc."
-  (setq output (substring output (string-match "\n" output)))
+  (setq output (substring output (string-search "\n" output)))
   (while (string-match "\\(\n\\|\\`\\)%.*\\(\n  .*\\)*" output)
     (setq output (replace-match "" nil t output)))
   (unless
@@ -1431,12 +1431,12 @@ and then calls `idlwave-shell-send-command' for any pending commands."
        (unwind-protect
            (progn
              ;; Ring the bell if necessary
-             (while (setq p (string-match "\C-G" string))
+             (while (setq p (string-search "\C-G" string))
                (ding)
                (aset string p ?\C-j ))
              (if idlwave-shell-hide-output
                  (save-excursion
-                   (while (setq p (string-match "\C-M" string))
+                   (while (setq p (string-search "\C-M" string))
                      (aset string p ?\  ))
                    (set-buffer
                     (get-buffer-create idlwave-shell-hidden-output-buffer))
@@ -1445,7 +1445,7 @@ and then calls `idlwave-shell-send-command' for any pending commands."
                (comint-output-filter proc string))
              ;; Watch for magic - need to accumulate the current line
              ;; since it may not be sent all at once.
-             (if (string-match "\n" string)
+             (if (string-search "\n" string)
                  (progn
                    (if idlwave-shell-use-input-mode-magic
                        (idlwave-shell-input-mode-magic
index b55a98af0b39986ae56839d8814baad0c5e6655c..55e712dd77dc187ac61d5dfc191fe69222ea7223 100644 (file)
@@ -2547,7 +2547,7 @@ If there is no label point is not moved and nil is returned."
         (end (idlwave-find-key ":" 1 'nomark eos)))
     (if (and end
              (= (nth 0 (parse-partial-sexp start end)) 0)
-            (not (string-match "\\?" (buffer-substring start end)))
+            (not (string-search "?" (buffer-substring start end)))
             (not (string-match "^::" (buffer-substring end eos))))
         (progn
           (forward-char)
@@ -7677,9 +7677,9 @@ arg, the class property is cleared out."
 
   (interactive "P")
   (idlwave-routines)
-  (if (string-match "->" (buffer-substring
-                         (max (point-min) (1- (point)))
-                         (min (+ 2 (point)) (point-max))))
+  (if (string-search "->" (buffer-substring
+                          (max (point-min) (1- (point)))
+                          (min (+ 2 (point)) (point-max))))
       ;; Cursor is on an arrow
       (if (get-text-property (point) 'idlwave-class)
          ;; arrow has class property
index aff3066c69866dad2d80dd1bf06b5eb10991685b..b1a5f3015878a3cebf4f55732bd4d6c91873be61 100644 (file)
@@ -895,7 +895,7 @@ startup file, `~/.emacs-octave'."
 (defun inferior-octave-completion-at-point ()
   "Return the data to complete the Octave symbol at point."
   ;; https://debbugs.gnu.org/14300
-  (unless (string-match-p "/" (or (comint--match-partial-filename) ""))
+  (unless (string-search "/" (or (comint--match-partial-filename) ""))
     (let ((beg (save-excursion
                  (skip-syntax-backward "w_" (comint-line-beginning-position))
                  (point)))
index 91db4ae21cbdbc991b3d0a708fbc67a65cca396b..2f98b9c53c1ead4529b914e74a3d306bd107962d 100644 (file)
@@ -2672,7 +2672,7 @@ t means to return a list of all possible completions of STRING.
           (or sh-shell-variables-initialized
               (sh-shell-initialize-variables))
           (nconc (mapcar (lambda (var)
-                            (substring var 0 (string-match "=" var)))
+                            (substring var 0 (string-search "=" var)))
                          process-environment)
                  sh-shell-variables))))
     (complete-with-action code vars string predicate)))
index b9012166a528ff430430a8df39aecbab732251bc..d144d68b57148db931ab08f38e3988cc8ffd6d88 100644 (file)
@@ -1573,7 +1573,7 @@ statement.  The format of variable should be a valid
            face)))
 
   (defun sql-regexp-abbrev (keyword)
-    (let ((brk   (string-match "[~]" keyword))
+    (let ((brk   (string-search "~" keyword))
           (len   (length keyword))
           (sep   "\\(?:")
           re i)
index 613863dd613ddb6530c6496e0586724d971bd05f..70763319840639d6cd7925d54ae6d1f4f739f47c 100644 (file)
@@ -936,7 +936,7 @@ the remaining input.")
       (setq call-noexcursion nil)
       (with-current-buffer (process-buffer proc)
        (cond ((eq xscheme-process-filter-state 'idle)
-              (let ((start (string-match "\e" xscheme-filter-input)))
+              (let ((start (string-search "\e" xscheme-filter-input)))
                 (if start
                     (progn
                       (xscheme-process-filter-output
@@ -960,7 +960,7 @@ the remaining input.")
                         (xscheme-process-filter-output ?\e char)
                         (setq xscheme-process-filter-state 'idle)))))))
              ((eq xscheme-process-filter-state 'reading-string)
-              (let ((start (string-match "\e" xscheme-filter-input)))
+              (let ((start (string-search "\e" xscheme-filter-input)))
                 (if start
                     (let ((string
                            (concat xscheme-string-accumulator
index c67877efd5dc01d454af9283faaf8b445fdbbdb0..1d6f091dc71a764e27032a5a745bbfee8f32dfe9 100644 (file)
@@ -310,7 +310,7 @@ the original string if not."
                                         ;; but not after (quote foo).
                                         (and (eq (car-safe (car pos)) 'quote)
                                              (not (= ?\( (aref to 0)))))
-                                    (eq (string-match " " to (cdr pos))
+                                    (eq (string-search " " to (cdr pos))
                                         (cdr pos)))
                                (1+ (cdr pos))
                              (cdr pos))))
@@ -633,13 +633,13 @@ Arguments REGEXP, START, END, and REGION-NONCONTIGUOUS-P are passed to
     (if (listp to-strings)
        (setq replacements to-strings)
       (while (/= (length to-strings) 0)
-       (if (string-match " " to-strings)
+       (if (string-search " " to-strings)
            (setq replacements
                  (append replacements
                          (list (substring to-strings 0
-                                          (string-match " " to-strings))))
+                                          (string-search " " to-strings))))
                  to-strings (substring to-strings
-                                      (1+ (string-match " " to-strings))))
+                                      (1+ (string-search " " to-strings))))
          (setq replacements (append replacements (list to-strings))
                to-strings ""))))
     (perform-replace regexp replacements t t nil n nil start end nil region-noncontiguous-p)))
index 5aab80d1031087910a13d685c42c0a426cf6f04a..292f267d2e1df21360ea27efc45ac22fb0d3aa03 100644 (file)
@@ -1252,7 +1252,7 @@ Returns t if successful."
     (list
      start end
      (lambda (string pred action)
-       (if (string-match "/" string)
+       (if (string-search "/" string)
            (completion-file-name-table string pred action)
          (complete-with-action action completions string pred)))
      :exit-function
@@ -1328,7 +1328,7 @@ Returns non-nil if successful."
                 (looking-at "\\$?[({]*")
                 (match-end 0)))
              (variables (mapcar (lambda (x)
-                                  (substring x 0 (string-match "=" x)))
+                                  (substring x 0 (string-search "=" x)))
                                 process-environment))
              (suffix (pcase (char-before start) (?\{ "}") (?\( ")") (_ ""))))
         (list start end variables
index 3ad8634975f18250eb473e6208ba03aa48ef78ba..985beb06fc9c229db35df4967869d3eb64878e13 100644 (file)
@@ -4272,11 +4272,11 @@ the contents are inserted into the buffer anyway.
 
 Optional arguments ACTION and FRAME are as for `display-buffer',
 and are used only if a pop-up buffer is displayed."
-  (cond ((and (stringp message) (not (string-match "\n" message)))
+  (cond ((and (stringp message) (not (string-search "\n" message)))
         ;; Trivial case where we can use the echo area
         (message "%s" message))
        ((and (stringp message)
-             (= (string-match "\n" message) (1- (length message))))
+             (= (string-search "\n" message) (1- (length message))))
         ;; Trivial case where we can just remove single trailing newline
         (message "%s" (substring message 0 (1- (length message)))))
        (t
index 34fbec9c2189f3989469ac005a8423c60cd854b9..3cc3e2760670e747296268f61c29b11004045d7d 100644 (file)
@@ -3270,7 +3270,7 @@ Handles end-of-sublist smartly."
 Clicking this button expands or contracts a directory.  TEXT is the
 button clicked which has either a + or -.  TOKEN is the directory to be
 expanded.  INDENT is the current indentation level."
-  (cond ((string-match "\\+" text)     ;we have to expand this dir
+  (cond ((string-search "+" text)      ;we have to expand this dir
         (setq speedbar-shown-directories
               (cons (expand-file-name
                      (concat (speedbar-line-directory indent) token "/"))
@@ -3283,7 +3283,7 @@ expanded.  INDENT is the current indentation level."
             (speedbar-default-directory-list
              (concat (speedbar-line-directory indent) token "/")
              (1+ indent)))))
-       ((string-match "-" text)        ;we have to contract this node
+       ((string-search "-" text)       ;we have to contract this node
         (speedbar-reset-scanners)
         (let ((oldl speedbar-shown-directories)
               (newl nil)
@@ -3317,7 +3317,7 @@ INDENT is the current indentation level and is unused."
 The parameter TEXT and TOKEN are required, where TEXT is the button
 clicked, and TOKEN is the file to expand.  INDENT is the current
 indentation level."
-  (cond ((string-match "\\+" text)     ;we have to expand this file
+  (cond ((string-search "+" text)      ;we have to expand this file
         (let* ((fn (expand-file-name (concat (speedbar-line-directory indent)
                                              token)))
                (lst (speedbar-fetch-dynamic-tags fn)))
@@ -3329,7 +3329,7 @@ indentation level."
               (save-excursion
                 (end-of-line) (forward-char 1)
                 (funcall (car lst) indent (cdr lst)))))))
-       ((string-match "-" text)        ;we have to contract this node
+       ((string-search "-" text)       ;we have to contract this node
         (speedbar-change-expand-button-char ?+)
         (speedbar-delete-subblock indent))
        (t (error "Ooops...  not sure what to do")))
@@ -3358,14 +3358,14 @@ INDENT is the current indentation level."
   "Expand a tag sublist.  Imenu will return sub-lists of specialized tag types.
 Etags does not support this feature.  TEXT will be the button string.
 TOKEN will be the list, and INDENT is the current indentation level."
-  (cond ((string-match "\\+" text)     ;we have to expand this file
+  (cond ((string-search "+" text)      ;we have to expand this file
         (speedbar-change-expand-button-char ?-)
         (speedbar-with-writable
           (save-excursion
             (end-of-line) (forward-char 1)
             (speedbar-insert-generic-list indent token 'speedbar-tag-expand
                                           'speedbar-tag-find))))
-       ((string-match "-" text)        ;we have to contract this node
+       ((string-search "-" text)       ;we have to contract this node
         (speedbar-change-expand-button-char ?+)
         (speedbar-delete-subblock indent))
        (t (error "Ooops...  not sure what to do")))
index 87298b5cfde625e26c639b8734fa1e07e548a09e..1cae3ee1a609ecfe8d39235aafe3fce5d98ff126 100644 (file)
@@ -4808,7 +4808,7 @@ It understands Emacs Lisp quoting within STRING, such that
   (split-string-and-unquote (combine-and-quote-strings strs)) == strs
 The SEPARATOR regexp defaults to \"\\s-+\"."
   (let ((sep (or separator "\\s-+"))
-       (i (string-match "\"" string)))
+       (i (string-search "\"" string)))
     (if (null i)
        (split-string string sep t)     ; no quoting:  easy
       (append (unless (eq i 0) (split-string (substring string 0 i) sep t))
index 3f0cca0ab7a0716a6258b48835b15dacc2faf00a..411c71cd8c4c2d2def901484b45a99eaf8046506 100644 (file)
@@ -962,7 +962,7 @@ return nil.  Otherwise point is returned."
          (new-buffer-file-name (expand-file-name
                                 ;; `:' is not allowed on Windows
                                 (concat tarname "!"
-                                        (if (string-match "/" name)
+                                        (if (string-search "/" name)
                                             name
                                           ;; Make sure `name' contains a /
                                           ;; so set-auto-mode doesn't try
index 27f0bb1be3b843e3a4779d25f2fb53ca888a4242..b3870a814d213045122f0182f0ac7060e5e9c9fd 100644 (file)
@@ -3488,9 +3488,9 @@ The top-most line is line 0."
        ((= (aref string 0) ?\032)
         ;; gdb (when invoked with -fullname) prints:
         ;; \032\032FULLFILENAME:LINENUMBER:CHARPOS:BEG_OR_MIDDLE:PC\n
-        (let* ((first-colon (string-match ":" string 1))
+        (let* ((first-colon (string-search ":" string 1))
                (second-colon
-                (string-match ":" string (1+ first-colon)))
+                (string-search ":" string (1+ first-colon)))
                (filename (substring string 1 first-colon))
                (fileline (string-to-number
                           (substring string (1+ first-colon) second-colon))))
@@ -4307,7 +4307,7 @@ well as the newer ports COM10 and higher."
     (when (or (null x) (and (stringp x) (zerop (length x))))
       (error "No serial port selected"))
     (when (not (or (serial-port-is-file-p)
-                   (string-match "\\\\" x)))
+                   (string-search "\\" x)))
       (setq x (concat "\\\\.\\" x)))
     x))
 
index 31186fb4facb1a2702587f0d39b158f7436b1ba1..5cece1aa3c60bbd5a24c6d448cb54f580dc9bf01 100644 (file)
@@ -3962,7 +3962,7 @@ Optional arg COMMA is as in `bibtex-enclosing-field'.  It is t for
 interactive calls."
   (interactive (list nil t))
   (unless field (setq field (car (bibtex-find-text-internal nil nil comma))))
-  (if (string-match "@" field)
+  (if (string-search "@" field)
       (cond ((bibtex-string= field "@string")
              (message "String definition"))
             ((bibtex-string= field "@preamble")
index 4c64531ea35c7fac86c4b8d6b11df77d041297a1..67852998f42236fac8646a04bd92620cf3b26596 100644 (file)
@@ -2497,7 +2497,7 @@ if defined."
                    "Customize `ispell-alternate-dictionary' to set yours.")))
 
   (let* ((process-connection-type ispell-use-ptys-p)
-        (wild-p (string-match "\\*" word))
+        (wild-p (string-search "*" word))
         (look-p (and ispell-look-p     ; Only use look for an exact match.
                      (or ispell-have-new-look (not wild-p))))
         (prog (if look-p ispell-look-command ispell-grep-command))
@@ -2560,7 +2560,7 @@ if defined."
        (continue t)
        end)
     (while continue
-      (setq end (string-match "\n" output start)) ; get text up to the newline.
+      (setq end (string-search "\n" output start)) ; get text up to the newline.
       ;; If we get out of sync and ispell-filter-continue is asserted when we
       ;; are not continuing, treat the next item as a separate list.  When
       ;; ispell-filter-continue is asserted, ispell-filter *should* always be a
@@ -2732,11 +2732,11 @@ Optional third arg SHIFT is an offset to apply based on previous corrections."
       (if (eq type ?#)
          (setq count 0)                ; no misses for type #
        (setq count (string-to-number output) ; get number of misses.
-             output (substring output (1+ (string-match " " output 1)))))
+             output (substring output (1+ (string-search " " output 1)))))
       (setq offset (string-to-number output))
       (setq output (if (eq type ?#)     ; No miss or guess list.
                        nil
-                     (substring output (1+ (string-match " " output 1)))))
+                     (substring output (1+ (string-search " " output 1)))))
       (while output
        (let ((end (string-match ", \\|\\($\\)" output))) ; end of miss/guess.
          (setq cur-count (1+ cur-count))
@@ -4077,7 +4077,7 @@ Includes LaTeX/Nroff modes and extended character mode."
                   (ispell-send-string "+\n~tex\n"))
                  ((string-match "nroff-mode" string)
                   (ispell-send-string "-\n~nroff\n"))
-                 ((string-match "~" string) ; Set extended character mode.
+                 ((string-search "~" string) ; Set extended character mode.
                   (ispell-send-string (concat string "\n")))
                  (t (message "Invalid Ispell Parsing argument!")
                     (sit-for 2))))))))
index 650d11d4acad7f70188020d790d0f008900fea70..895064b82f3d5e8da32aa4ecc287c73dbc93aae6 100644 (file)
@@ -718,7 +718,7 @@ While entering the regexp, completion on knows citation keys is possible.
         (insert string))
 
       ;; Reposition cursor?
-      (when (string-match "\\?" string)
+      (when (string-search "?" string)
         (search-backward "?")
         (delete-char 1))
 
index 0157f8443aa1397171f56b6b7a9e249ac797568d..9def10cee056147f709d15c153a5d2f52222c803 100644 (file)
@@ -757,7 +757,7 @@ if the information is exact (t) or approximate (nil)."
              (while (and (setq tail (memq (assq 'toc (cdr tail)) tail))
                          (setq entry (car tail))
                          (>= (nth 5 entry) level))
-               (setq star (string-match "\\*" (nth 6 entry))
+               (setq star (string-search "*" (nth 6 entry))
                      context (nth 2 entry)
                      section-number
                      (reftex-section-number (nth 5 entry) star))
index 611102ecbacb2a8166d756c3cbbd112936728a44..190818259314c7f20cd7bd70a9169ad8575c02a9 100644 (file)
@@ -798,7 +798,7 @@ When called with 2 C-u prefix args, disable magic word recognition."
       (push (cons (current-buffer) buffer-invisibility-spec)
             reftex-buffers-with-changed-invisibility)
       (setq buffer-invisibility-spec nil))
-     ((string-match "\r" (buffer-substring beg end))
+     ((string-search "\r" (buffer-substring beg end))
       ;; Invisible with selective display.  We need to copy it.
       (let ((string (buffer-substring-no-properties beg end)))
         (switch-to-buffer "*RefTeX Context Copy*")
index c732299361c3be402610083dd5737f3773842d8d..1cb2cf40c3b9650c066edbca434e349724fbeda5 100644 (file)
@@ -813,7 +813,7 @@ This enforces rescanning the buffer on next use."
             (setq wordlist (nthcdr 4 entry)))
 
         (if (and (stringp fmt)
-                 (string-match "@" fmt))
+                 (string-search "@" fmt))
             ;; Special syntax for specifying a label format
             (setq fmt (split-string fmt "@+"))
           (setq fmt (list "\\label{%s}" fmt)))
index d9d8059f9601f1cef95fef981647924b6e879ddf..5169377c1363b351014022370d061f6a6cb13453 100644 (file)
@@ -2072,7 +2072,7 @@ Return the process in which TeX is running."
     (let* ((cmd (eval command t))
           (proc (tex-shell-proc))
           (buf (process-buffer proc))
-           (star (string-match "\\*" cmd))
+           (star (string-search "*" cmd))
           (string
            (concat
             (if (null file)
@@ -2474,7 +2474,7 @@ Only applies the FSPEC to the args part of FORMAT."
 
 (defun tex-start-tex (command file &optional dir)
   "Start a TeX run, using COMMAND on FILE."
-  (let* ((star (string-match "\\*" command))
+  (let* ((star (string-search "*" command))
          (compile-command
           (if star
              (concat (substring command 0 star)
@@ -2773,7 +2773,7 @@ so normally SUFFIX starts with one."
          ;; Not found, so split on first period.
          (concat (file-name-directory file-name)
                  (substring file 0
-                            (string-match "\\." file))
+                            (string-search "." file))
                  suffix)))
     " "))
 
index 5bbf1a85b36db873de77013eff49576b49b963cc..66bbfb0f9f63eea08cee0fa43b754c1a64bb87ae 100644 (file)
@@ -492,7 +492,7 @@ looks like an email address, \"ftp://\" if it starts with
         (and (string-match "\\`[[:alnum:]]+\\'" str)
              (eq (char-before (car bounds)) ?<)
              (eq (char-after  (cdr bounds)) ?>)
-             (not (string-match "~" (expand-file-name (concat "~" str))))
+             (not (string-search "~" (expand-file-name (concat "~" str))))
              (setq str (concat "mailto:" str)))
         ;; If it looks like news.example.com, treat it as news.
         (if (thing-at-point-newsgroup-p str)
index 2040f52270021bd765f0b2ce7dc1f694d8e20b92..71082bd2f4be4f69d13347b56912d4c34d47d800 100644 (file)
@@ -268,7 +268,7 @@ Stores a list of all the shortcuts in the free variable `tmm-short-cuts'."
           (cdr elt)))
    (t
     (let* ((str (car elt))
-           (paren (string-match "(" str))
+           (paren (string-search "(" str))
            (pos 0) (word 0) char)
       (catch 'done                             ; ??? is this slow?
         (while (and (or (not tmm-shortcut-words)   ; no limit on words
index 4087a0c68a6ab3661c7d99d915b90b235b11b917..5f441e80ddd9af1bcc9bbe8694fe020b3768030c 100644 (file)
@@ -3073,7 +3073,7 @@ Optional support for popup buttons is also implemented here."
               ;; the definition, then we want to drop the space that
               ;; is reinserted above.  False-positives are possible
               ;; for silly bindings like "-C-c C-c".
-              (unless (string-match-p " " key)
+              (unless (string-search " " key)
                 (setq pre (string-replace " " "" pre))
                 (setq suf (string-replace " " "" suf)))
               (concat (propertize pre 'face 'default)
index f291414e81b5882e54d9cec1e0d059ad5c6b985e..06cfacc99d6e3009bf77549e85c3a130dd9ee5ab 100644 (file)
@@ -102,10 +102,10 @@ instead of the filename inheritance method."
      (byserv
       (setq retval (cdr-safe (assoc file byserv)))
       (if (and (not retval)
-              (string-match "/" file))
+              (string-search "/" file))
          (while (and byserv (not retval))
            (setq data (car (car byserv)))
-           (if (or (not (string-match "/" data)) ; It's a realm - take it!
+           (if (or (not (string-search "/" data)) ; It's a realm - take it!
                    (and
                     (>= (length file) (length data))
                     (string= data (substring file 0 (length data)))))
@@ -251,12 +251,12 @@ a match."
    (assoc dirkey keylist)
    ;; No exact match found.  Continue to look for partial match if
    ;; dirkey is not a realm.
-   (and (string-match "/" dirkey)
+   (and (string-search "/" dirkey)
         (let (match)
           (while (and (null match) keylist)
             (if (or
                  ;; Any realm candidate matches.  Why?
-                 (not (string-match "/" (caar keylist)))
+                 (not (string-search "/" (caar keylist)))
                  ;; Parent directory matches.
                  (string-prefix-p (caar keylist) dirkey))
                 (setq match (car keylist))
index 49cc587590e84ab342b14250684a985543bce82c..4fe909cadbc5347fcf8830f15b00af904f6658fa 100644 (file)
         (article (url-unhex-string (url-filename url))))
     (url-news-open-host host port (url-user url) (url-password url))
     (cond
-     ((string-match "@" article)       ; Its a specific article
+     ((string-search "@" article)      ; Its a specific article
       (setq buf (url-news-fetch-message-id host article)))
      ((string= article "")             ; List all newsgroups
       (gnus))
index 8b79736d004e813ac07dbb678faf49935a264729..113ac2833bc28e2fd95aa4a7ba2ee43094e3d104 100644 (file)
@@ -252,7 +252,7 @@ Will not do anything if `url-show-status' is nil."
     (while pairs
       (setq cur (car pairs)
            pairs (cdr pairs))
-      (unless (string-match "=" cur)
+      (unless (string-search "=" cur)
         (setq cur (concat cur "=")))
 
       (when (string-match "=" cur)
index ef607133e86b6fdd8c33638de5778d840ebe0e50..c8f36fb76ecf73fbaee01e74967f8c2242d555a4 100644 (file)
@@ -1173,7 +1173,7 @@ is non-nil."
            (mtime (file-attribute-modification-time (file-attributes file)))
            (parsed-time (progn (require 'parse-time)
                                (parse-time-string (concat time " +0000")))))
-      (cond ((and (not (string-match "\\+" time))
+      (cond ((and (not (string-search "+" time))
                   (decoded-time-second parsed-time)
                   ;; Compare just the seconds part of the file time,
                   ;; since CVS file time stamp resolution is just 1 second.
index 54b71c9f9f61c88c3e515b4cf8d81727b029c837..7ce0633b40bbd811130635ff423168836d671dc8 100644 (file)
@@ -218,7 +218,7 @@ Nothing is assumed about value."
              (error (prin1-to-string signal)))))
     (when (string-match "\n\\'" pp)
       (setq pp (substring pp 0 (1- (length pp)))))
-    (if (cond ((string-match "\n" pp)
+    (if (cond ((string-search "\n" pp)
               nil)
              ((> (length pp) (- (window-width) (current-column)))
               nil)
index 0bc992d8f7fc7bda8dbb028e83e0d3fd30cf3229..fe9f8969c3e42ccd71c60bd49c1ad9fee56b845f 100644 (file)
@@ -418,7 +418,7 @@ As a special case, if PATHS is nil then replace it by calling
   (if (memq system-type '(windows-nt ms-dos))
       (cond ((null paths)
             (mapcar #'woman-Cyg-to-Win (woman-parse-man.conf)))
-           ((string-match-p ";" paths)
+           ((string-search ";" paths)
             ;; Assume DOS-style path-list...
             (mapcan                    ; splice list into list
              (lambda (x)
@@ -1939,12 +1939,12 @@ Optional argument REDRAW, if non-nil, forces mode line to be updated."
                   (setq symbol (car p)) ; 1. name
                   (if (functionp symbol) ; 2. command doc
                       (if (setq doc (documentation symbol t))
-                          (substring doc 0 (string-match "\n" doc))
+                          (substring doc 0 (string-search "\n" doc))
                         "(not documented)"))
                   (if (custom-variable-p symbol)       ; 3. variable doc
                       (if (setq doc (documentation-property
                                      symbol 'variable-documentation t))
-                          (substring doc 0 (string-match "\n" doc))))))
+                          (substring doc 0 (string-search "\n" doc))))))
        (setq p (cdr p))))
     ;; Output the result:
     (and (apropos-print t nil)
@@ -1955,7 +1955,7 @@ Optional argument REDRAW, if non-nil, forces mode line to be updated."
 (defun WoMan-getpage-in-background (topic)
   "Use TOPIC to start WoMan from `Man-follow-manual-reference'."
   ;; topic is a string, generally of the form "section topic"
-  (let ((s (string-match " " topic)))
+  (let ((s (string-search " " topic)))
     (if s (setq topic (substring topic (1+ s))))
     (woman topic)))
 
@@ -3840,7 +3840,7 @@ Leave 1 blank line.  Format paragraphs upto TO."
                ((eolp)                 ; extend line
                 ;; Insert character INCLUDING TEXT PROPERTIES:
                 ;; (insert (substring overlap i (1+ i)))
-                (let ((eol (string-match "\n" overlap i)))
+                (let ((eol (string-search "\n" overlap i)))
                   (insert (substring overlap i eol))
                   (setq i (or eol imax)))
                 )
index 4e2dd13ecbdb7135e0f0e32530fd3451caf50cc4..1b2d65573880b7b6adfdda8a6e288cec1692eb53 100644 (file)
@@ -922,11 +922,11 @@ references and parameter-entity references."
        (progn
          (setq elem     (match-string-no-properties 1 string)
                modifier (match-string-no-properties 2 string))
-         (if (string-match-p "|" elem)
+         (if (string-search "|" elem)
              (setq elem (cons 'choice
                               (mapcar 'xml-parse-elem-type
                                       (split-string elem "|"))))
-           (if (string-match-p "," elem)
+           (if (string-search "," elem)
                (setq elem (cons 'seq
                                 (mapcar 'xml-parse-elem-type
                                         (split-string elem ",")))))))
index 9552bf0e3979ba80ded3fdf5b0ec934237355ab3..276530fb4d3b20fca4e6d790a63b3368ca4e77db 100644 (file)
       (let ((res (buffer-string)))
         ;; Don't care too much about the format of the output, but
         ;; check that key information is present.
-        (should (string-match-p "foo-file" res))
-        (should (string-match-p "foo-fun" res))
-        (should (string-match-p "bar-file" res))
-        (should (string-match-p "it wasn't" res))
-        (should (string-match-p "999" res))))))
+        (should (string-search "foo-file" res))
+        (should (string-search "foo-fun" res))
+        (should (string-search "bar-file" res))
+        (should (string-search "it wasn't" res))
+        (should (string-search "999" res))))))
 
 (provide 'check-declare-tests)
 ;;; check-declare-tests.el ends here
index db93250b17b2a41f7bfbd68dffae5a3ba28c5bb1..fb24b98595b09ac9d4b876255dd991dd3d22a1ac 100644 (file)
@@ -610,7 +610,7 @@ unquoted file names."
 (ert-deftest files-tests-file-name-non-special-dired-compress-handler ()
   ;; `dired-compress-file' can get confused by filenames with ":" in
   ;; them, which causes this to fail on `windows-nt' systems.
-  (when (string-match-p ":" (expand-file-name temporary-file-directory))
+  (when (string-search ":" (expand-file-name temporary-file-directory))
     (ert-skip "FIXME: `dired-compress-file' unreliable when filenames contain `:'."))
   (files-tests--with-temp-non-special (tmpfile nospecial)
     (let ((compressed (dired-compress-file nospecial)))
index 1a4cc744f0c908a56ab8d5804f5d9bda09809183..4a0b23dd26f3e24ee3925db7b7eae949af31d4e5 100644 (file)
     (when prev
       (setq string (concat prev string))
       (process-put proc 'previous-string nil)))
-  (if (and (not (string-match "\n" string))
+  (if (and (not (string-search "\n" string))
            (> (length string) 0))
       (process-put proc 'previous-string string))
   (let ((command (split-string string)))
index 0309b2b1ad658b513cc3a711755816f0d556dafe..134f5676709116d3818b60f339e16477de8ee49d 100644 (file)
@@ -56,7 +56,7 @@
     (set-buffer-multibyte nil)
     (insert (encode-coding-string "あ" 'euc-jp) "\xd" "\n")
     (decode-coding-region (point-min) (point-max) 'euc-jp-dos)
-    (should-not (string-match-p "\^M" (buffer-string)))))
+    (should-not (string-search "\^M" (buffer-string)))))
 
 ;; Return the contents (specified by CONTENT-TYPE; ascii, latin, or
 ;; binary) of a test file.