emacs/lisp/emacs-lisp
Mattias Engdegård 3b7b181bde Use string-search instead of string-match[-p]
`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`.
2021-08-09 11:35:56 +02:00
..
advice.el Rename feature nativecomp' into native-compile' 2021-05-05 22:27:29 +02:00
autoload.el * lisp/emacs-lisp/autoload.el (autoload--make-defs-autoload): Display warning. 2021-08-01 22:58:09 +03:00
avl-tree.el Doc fixes in avl-tree.el 2021-04-28 19:36:42 +03:00
backquote.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
backtrace.el (backtrace-goto-source-functions): Make it a normal abnormal hook 2021-02-13 10:41:45 -05:00
benchmark.el * lisp/emacs-lisp/benchmark.el (benchmark-elapse): Tweak 2021-06-11 14:06:29 -04:00
bindat.el Evaluate eql specializers 2021-08-03 18:26:15 -04:00
byte-opt.el Cease attempts to const-propagate through setq 2021-08-05 15:33:05 +02:00
byte-run.el Merge commit '9cbdf20316' into native-comp 2021-03-09 10:03:47 +01:00
bytecomp.el Single source optimiser entry point 2021-07-30 09:54:29 +02:00
cconv.el Simplify lexical let-optimisations 2021-07-30 14:37:38 +02:00
chart.el EIEIO: Promote the CLOS behavior over the EIEIO-specific behavior 2021-06-12 16:22:03 -04:00
check-declare.el ; Normalize and add missing first and last lines 2021-04-19 12:21:01 +02:00
checkdoc.el * lisp/**/*.el: Avoid positional args to define-minor-mode 2021-04-11 23:47:14 -04:00
cl-extra.el * lisp/emacs-lisp/cl-preloaded.el: Fix the format of props in slot-descs 2021-06-24 17:32:20 -04:00
cl-generic.el * lisp/emacs-lisp/cl-generic.el (cl-generic-generalizers): Don't emit warning 2021-08-03 19:02:11 -04:00
cl-indent.el ; Fix typos: emacs lisp -> Emacs Lisp 2021-04-16 14:54:02 +02:00
cl-lib.el Move generalized variable specs from cl-lib.el to gv.el 2021-07-22 00:21:34 +02:00
cl-macs.el * lisp/emacs-lisp/cl-macs.el: Add cl-type pattern 2021-07-30 17:23:32 -04:00
cl-preloaded.el * lisp/emacs-lisp/cl-preloaded.el: Fix the format of props in slot-descs 2021-06-24 17:32:20 -04:00
cl-print.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
cl-seq.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
comp-cstr.el * Improve `comp-normalize-valset' reproducibility (bug#48021) 2021-04-29 21:07:07 +02:00
comp.el Use string-replace instead of replace-regexp-in-string 2021-08-08 19:25:26 +02:00
copyright.el Fix an unlikely `copyright-find-copyright' problem 2021-07-18 14:31:09 +02:00
crm.el * lisp/minibuffer.el (completion-in-region--single-word): Simplify 2021-06-26 12:29:52 -04:00
cursor-sensor.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
debug.el * lisp/emacs-lisp/debug.el (debug): Fix (bug#47588) 2021-04-18 01:03:43 -04:00
derived.el Introduce an :interactive keyword for `defined-derived-mode' 2021-02-14 12:58:20 +01:00
disass.el * Fix error while disassembling native code on macOS 2021-08-03 10:27:20 +02:00
easy-mmode.el Improve `define-globalized-minor-mode' doc strings 2021-08-04 09:38:45 +02:00
easymenu.el Clarify obsoletion messages for easy-menu-{add,remove} 2021-04-07 14:33:10 +02:00
edebug.el Evaluate eql specializers 2021-08-03 18:26:15 -04:00
eieio-base.el EIEIO: Promote the CLOS behavior over the EIEIO-specific behavior 2021-06-12 16:22:03 -04:00
eieio-compat.el * lisp/emacs-lisp/edebug.el (edebug--handle-&-spec-op <&name>): New method 2021-02-13 16:21:53 -05:00
eieio-core.el * lisp/emacs-lisp/macroexp.el (macroexp-warn-and-return): Add arg category 2021-07-21 11:11:50 -04:00
eieio-custom.el EIEIO: Promote the CLOS behavior over the EIEIO-specific behavior 2021-06-12 16:22:03 -04:00
eieio-datadebug.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
eieio-opt.el Use string-search instead of string-match[-p] 2021-08-09 11:35:56 +02:00
eieio-speedbar.el Use string-search instead of string-match[-p] 2021-08-09 11:35:56 +02:00
eieio.el * lisp/emacs-lisp/macroexp.el (macroexp-warn-and-return): Add arg category 2021-07-21 11:11:50 -04:00
eldoc.el Look for ElDoc buffer in all visible frames 2021-05-18 16:31:19 +01:00
elint.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
elp.el ; End recently added sentences with a period. 2021-06-01 20:21:51 +01:00
ert-x.el Fix a few Edebug specifications where code is wrapped in lambdas. 2021-05-17 10:09:43 +02:00
ert.el Handle test environment variables 2021-07-01 13:43:44 +02:00
ewoc.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
faceup.el ; Remove some useless comments 2021-04-16 14:54:02 +02:00
find-func.el Make (find-face-definition 'default) work more reliably 2021-06-25 17:16:28 +02:00
float-sup.el * lisp/emacs-lisp/float-sup.el (pi): Actually mark it as obsolete 2021-04-12 12:53:53 -04:00
generator.el Fix copyright lines mistakenly treated as outline headers 2021-03-18 23:32:57 -04:00
generic.el Prefer defvar-local in emacs-lisp/*.el 2021-01-31 14:55:53 +01:00
gv.el Move generalized variable specs from cl-lib.el to gv.el 2021-07-22 00:21:34 +02:00
helper.el Use lexical-binding in all of lisp/emacs-lisp 2021-01-28 14:42:21 -05:00
hierarchy.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
inline.el * lisp/emacs-lisp/cconv.el: Improve line-nb info of unused var warnings 2021-02-26 20:24:52 -05:00
let-alist.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
lisp-mnt.el Use string-search instead of string-match[-p] 2021-08-09 11:35:56 +02:00
lisp-mode.el Adjust docstring of lisp-mode (bug#49278) 2021-06-30 17:00:20 +01:00
lisp.el Don't signal scan-error in interactive sexp-based commands 2021-04-30 17:31:20 +02:00
macroexp.el ; * lisp/emacs-lisp/macroexp.el (macroexp-warn-and-return): Doc fix. 2021-07-22 10:31:14 +03:00
map-ynp.el Merge from origin/emacs-27 2021-04-25 09:16:09 -07:00
map.el Evaluate eql specializers 2021-08-03 18:26:15 -04:00
memory-report.el Define revert-buffer-function for *Memory Report* 2021-07-16 20:05:31 +02:00
nadvice.el Fix a few Edebug specifications where code is wrapped in lambdas. 2021-05-17 10:09:43 +02:00
package-x.el * lisp/gnus/gnus-art.el: Fix misuse of standard-value. 2021-02-02 14:39:28 -05:00
package.el Fix prin1 problem in package-quickstart-refresh 2021-08-07 13:02:01 +02:00
pcase.el * lisp/emacs-lisp/pcase.el (pcase-compile-patterns): New function (bug#47261) 2021-03-19 17:42:22 -04:00
pp.el Merge from origin/emacs-27 2021-05-04 07:50:25 -07:00
radix-tree.el Evaluate eql specializers 2021-08-03 18:26:15 -04:00
re-builder.el Use string-replace instead of replace-regexp-in-string 2021-08-08 19:25:26 +02:00
regexp-opt.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
regi.el Use lexical-binding in all of lisp/emacs-lisp 2021-01-28 14:42:21 -05:00
ring.el ; Remove some useless comments 2021-04-16 14:54:02 +02:00
rmc.el Fix a recent change in rmc.el 2021-05-07 17:09:44 +03:00
rx.el ; * lisp/emacs-lisp/rx.el (rx--pcase-macroexpander): slight rephrase 2021-05-29 09:18:01 +02:00
seq.el Work around long-standing seq.el compilation warning 2021-07-30 13:13:46 +02:00
shadow.el Ignore .dir-locals-2.el files more 2021-07-04 16:23:46 +02:00
shortdoc.el Rename directory-append to file-name-concat 2021-07-25 08:54:20 +02:00
smie.el * lisp/emacs-lisp/smie.el: Fix URL. Remove redundant :group args 2021-04-12 13:01:06 -04:00
subr-x.el Attempt to make defclass documentation more legible 2021-06-24 20:24:43 +02:00
syntax.el Give 'syntax-propertize-wholelines' a docstring. 2021-05-30 22:38:48 +02:00
tabulated-list.el Add commands to move to next/previous column in tabulated-list-mode 2021-07-25 09:16:08 +02:00
tcover-ses.el ; Normalize and add missing first and last lines 2021-04-19 12:21:01 +02:00
testcover.el ; Normalize and add missing first and last lines 2021-04-19 12:21:01 +02:00
text-property-search.el Even further `text-property-search-forward' clarifications 2021-05-12 19:01:53 +02:00
thunk.el Fix a few Edebug specifications where code is wrapped in lambdas. 2021-05-17 10:09:43 +02:00
timer-list.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
timer.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
tq.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
trace.el * lisp/emacs-lisp/trace.el (trace-values): Work outside of traced function 2021-03-02 09:13:57 -05:00
unsafep.el ; Normalize and add missing first and last lines 2021-04-19 12:21:01 +02:00
warnings.el Use string-search instead of string-match[-p] 2021-08-09 11:35:56 +02:00