summaryrefslogtreecommitdiff
path: root/doc/lispref/searching.texi
Commit message (Collapse)AuthorAge
* ; Add 2023 to copyright years.Eli Zaretskii2023-01-01
|
* Merge from origin/emacs-28Stefan Kangas2022-11-06
|\ | | | | | | | | | | 70fb03a49a ; * doc/emacs/search.texi (Lax Search): Improve suggestion... 5779df0c5b ; * doc/lispref/searching.texi: Remove reference to Posix.... 46929f6b73 ; Improve documentation of character classes in regexps
| * ; * doc/lispref/searching.texi: Remove reference to Posix. (Bug#58992)Eli Zaretskii2022-11-04
| |
| * ; Improve documentation of character classes in regexpsEli Zaretskii2022-11-04
| | | | | | | | | | | | * doc/lispref/searching.texi (Char Classes): Add notes about the dependence of character classes on case and syntax tables specific to buffers and modes. (Bug#58992)
* | ; Fix quoting of non-nil in texinfo sourcesStefan Kangas2022-10-27
| |
* | ; * doc/lispref/searching.texi (Rx Constructs): Copy-edit.Mattias Engdegård2022-10-24
| |
* | * doc/lispref/searching.texi (Rx Constructs): Elaborate intent.Mattias Engdegård2022-10-24
| | | | | | | | Suggested by Michael Heerdegen (bug#58727).
* | Clarify RX... semantics in manual (bug#58727)Mattias Engdegård2022-10-24
| | | | | | | | | | | | | | Suggested by Michael Heerdegen. * doc/lispref/searching.texi (Rx Constructs): Explain implicit concatenation of `RX...`.
* | Merge from origin/emacs-28Stefan Kangas2022-07-14
|\| | | | | | | | | | | | | | | | | | | | | | | 5e47ec9511 ; * lisp/url/url-http.el (url-http-parse-headers): Fix typo. ba0871bef1 ; Fix typos: prefer American spelling e3e7f31faa Adapt Tramp doc # Conflicts: # etc/NEWS # etc/themes/modus-themes.el # lisp/emacs-lisp/byte-opt.el # test/lisp/so-long-tests/spelling-tests.el
| * ; Fix typos: prefer American spellingStefan Kangas2022-07-13
| |
* | ; Fix recent changes in regexp documentationEli Zaretskii2022-05-09
| | | | | | | | | | * doc/lispref/searching.texi (Regexp Backslash): * doc/emacs/search.texi (Regexps): Fix typo and wording.
* | Copy edits for the regexp sections in the manualsLars Ingebrigtsen2022-05-09
| | | | | | | | | | | | * doc/lispref/searching.texi (Regexp Backslash): * doc/emacs/search.texi (Regexps, Regexp Backslash): Copy edits from Jay Bingham (bug#41970).
* | Merge from origin/emacs-28Eli Zaretskii2022-01-01
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 836be7a112 ; * etc/refcards/ru-refcard.tex: Update Copyright year. 86cbc6ee4a * lisp/net/tramp-sh.el: Adapt copyright year ebe8772f65 ; Minor fixes related to copyright years 23c1ee6989 ; * test/manual/etags/ETAGS.good_N: Adjust to copyright ye... 8d3fc7ec89 * src/xfaces.c (face_for_font): Make 'hash' be uintptr_t. 19dcb237b5 ; Add 2022 to copyright years. # Conflicts: # etc/NEWS # etc/refcards/ru-refcard.tex # lib/cdefs.h # lisp/erc/erc-dcc.el # lisp/erc/erc-imenu.el # lisp/erc/erc-replace.el # lisp/image-dired.el # lisp/progmodes/xref.el # m4/alloca.m4 # m4/byteswap.m4 # m4/errno_h.m4 # m4/getopt.m4 # m4/gnulib-common.m4 # m4/inttypes.m4 # m4/stddef_h.m4 # m4/stdint.m4 # m4/sys_socket_h.m4
| * ; Add 2022 to copyright years.Eli Zaretskii2022-01-01
| |
* | ; Fix spelling; be consistent with "key binding" (Bug#52674)Stefan Kangas2021-12-21
| |
* | Merge from origin/emacs-28Eli Zaretskii2021-11-03
|\| | | | | | | | | | | | | | | | | | | 3e4eb54 ; * etc/PROBLEMS: Minor copyedits of the last change. (Bug#5... 35bc211 Document a macOS error message when opening Emacs 4df9998 Fix header-line and tab-line when mode-line-compact is set 81915a9 Add manual section about how to avoid regexp problems a16e66c Clarify build environment 6ab6b2f Clarify build directory structure 9d61620 * src/pdumper.c (dump_do_dump_relocation): Add sanity check.
| * Add manual section about how to avoid regexp problemsMattias Engdegård2021-11-03
| | | | | | | | | | | | | | | | | | | | | | Help users affected by our NFA engine's stack overflows and occasional poor performance, replacing old text that was more limited in scope. * doc/lispref/elisp.texi (Top): * doc/lispref/searching.texi (Regular Expressions): Add menu entries. (Regexp Problems): New node. (Regexp Special): * etc/PROBLEMS: Remove superseded text.
* | Make 'inhibit-changing-match-data' obsolete and adjust callersLars Ingebrigtsen2021-10-07
|/ | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/searching.texi (Regexp Search): (POSIX Regexps): Document this. * lisp/subr.el (inhibit-changing-match-data): Make obsolete. (looking-at-p): Adjust call. * lisp/vc/vc-hg.el (vc-hg--raw-dirstate-search): (vc-hg--ignore-patterns-ignored-p): (vc-hg--cached-dirstate-search): Don't use `inhibit-changing-match-data'. * src/minibuf.c (Ftry_completion): (Fall_completions): (Ftest_completion): Adjust Fstring_match calls. * src/search.c (looking_at_1): Pass in modify_data. (Flooking_at): Add optional inhibit-modify parameter. (string_match_1): Pass in modify_data. (Fstring_match): (Fposix_looking_at, Fposix_string_match): Add optional inhibit-modify parameter.
* Rx documentation touch-ups (bug#46910)Mattias Engdegård2021-09-26
| | | | | | * doc/lispref/searching.texi (Rx Constructs, Rx Functions): Add clarifications and improve naming of arguments. Add examples illustrating the differences between `rx` and `rx-to-string`.
* ; Remove various duplicated wordsMattias Engdegård2021-09-25
| | | | | | | | | | | | | | | | | | * doc/lispref/searching.texi (Extending Rx): * doc/lispref/strings.texi (Creating Strings): * doc/misc/modus-themes.org (Measure color contrast (DIY)): * etc/NEWS: * lisp/find-file.el (ff-find-other-file): * lisp/gnus/gnus-group.el (gnus-group-suspend): * lisp/progmodes/cc-langs.el (c-ml-string-any-closer-re): * lisp/progmodes/flymake.el (flymake-list-only-diagnostics): * lisp/progmodes/xref.el (xref--group-name-for-display): * lisp/transient.el (transient-child, transient-files) (transient-infix-value): * src/alloc.c: * src/regex-emacs.c (regex_compile): Remove duplicate words in comments, documentation etc.
* * lisp/subr.el (string-replace): Add dashes to arg names (bug#50644)Juri Linkov2021-09-18
| | | | | * lisp/net/tramp-compat.el (tramp-compat-string-replace): Idem. * doc/lispref/searching.texi (Search and Replace): Idem.
* Add example of advanced user-defined Rx form to manualMattias Engdegård2021-08-23
| | | | | | | * doc/lispref/searching.texi (Extending Rx): Add example illustrating how to define a user-defined Rx form that performs computation, from a discussion with Michael Herdeegen (bug#50136). * lisp/emacs-lisp/rx.el (rx): Clarify evaluation time for `eval`.
* Fix recent documentation additionsEli Zaretskii2021-08-16
| | | | | * doc/lispref/searching.texi (Search and Replace): Document the new functions by @defun.
* Add new functions to replace strings/regexp in a regionLars Ingebrigtsen2021-08-16
| | | | | | | | * doc/lispref/searching.texi (Search and Replace): Document them. * lisp/subr.el (replace-string-in-region) (replace-regexp-in-region): New functions. * lisp/emacs-lisp/shortdoc.el (regexp, buffer): Mention them.
* Merge from origin/emacs-27Glenn Morris2021-05-31
|\ | | | | | | 5dfa5e26dd (origin/emacs-27) Improve documentation of regexp ranges
| * Improve documentation of regexp rangesEli Zaretskii2021-05-30
| | | | | | | | | | * doc/lispref/searching.texi (Regexp Special): Document the effect of using octal escapes in regexp ranges. (Bug#17758)
| * Update copyright year to 2021Paul Eggert2021-01-01
| | | | | | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
| * Regexps cannot infloop; fix manualMattias Engdegård2020-08-14
| | | | | | | | | | | | | | * doc/lispref/searching.texi (Regexp Special): Edit erroneous statements about infinite looping in regexps. (cherry picked from commit 63268253d21c57d991cba3f3b083d74f154a26fe)
* | ; Fix recent re-builder doc changes.Basil L. Contovounesios2021-05-08
| |
* | Mention that Emacs is usually case-insensitive in a couple of placesdalanicolai2021-05-08
| | | | | | | | | | | | | | | | | | | | * doc/lispref/searching.texi (Regular Expressions): Mention `case-fold-search'. * lisp/emacs-lisp/re-builder.el (re-builder): Mention case sensitivity toggles (bug#47534). Copyright-paperwork-exempt: yes
* | Update copyright year to 2021Paul Eggert2021-01-01
| | | | | | | | Run "TZ=UTC0 admin/update-copyright".
* | * doc/lispref/searching.texi (Rx Constructs): Group numbering fixMattias Engdegård2020-11-25
| |
* | ; * doc/lispref/searching.texi (Search and Replace): RephraseMattias Engdegård2020-09-28
| |
* | Improve accuracy in string-replace description (bug#43598)Mattias Engdegård2020-09-27
| | | | | | | | | | * doc/lispref/searching.texi (Search and Replace): More careful description; string-replace does not necessarily return a copy.
* | Rename replace-in-string to string-replaceLars Ingebrigtsen2020-09-27
| | | | | | | | | | | | | | | | | | * doc/lispref/searching.texi (Search and Replace): Update. * lisp/bindings.el (mode-line-position): Update callers. * lisp/subr.el (string-replace): Rename from replace-in-string since that clashes with XEmacs' replace-in-string which is equivalent to the Emacs replace-regexp-in-string (bug#43598).
* | Add new, simple `replace-in-string' functionLars Ingebrigtsen2020-09-15
| | | | | | | | | | | | * lisp/subr.el (replace-in-string): New, side-effect-free function. * doc/lispref/searching.texi (Search and Replace): Document it.
* | * doc/lispref/searching.texi (Regexp Special): Tweak wordingStefan Monnier2020-08-14
| |
* | Regexps cannot infloop; fix manualMattias Engdegård2020-05-03
|/ | | | | * doc/lispref/searching.texi (Regexp Special): Edit erroneous statements about infinite looping in regexps.
* Simplify rx example in manualMattias Engdegård2020-03-09
| | | | | * doc/lispref/searching.texi (Rx Notation): Use the 'not' shorthand introduced in Emacs 27.
* rx: Improve 'or' compositionality (bug#37659)Mattias Engdegård2020-03-01
| | | | | | | | | | | | | | | | | Perform 'regexp-opt' on nested 'or' forms, and after expansion of user-defined and 'eval' forms. Characters are now turned into strings for wider 'regexp-opt' scope. This preserves the longest-match semantics for string in 'or' forms over composition. * doc/lispref/searching.texi (Rx Constructs): Document. * lisp/emacs-lisp/rx.el (rx--normalise-or-arg) (rx--all-string-or-args): New. (rx--translate-or): Normalise arguments first, and check for strings in subforms. (rx--expand-eval): Extracted from rx--translate-eval. (rx--translate-eval): Call rx--expand-eval. * test/lisp/emacs-lisp/rx-tests.el (rx-or, rx-def-in-or): Add tests. * etc/NEWS: Announce.
* Warn about the likes of "[:alnum:]" in regexpsEli Zaretskii2020-02-22
| | | | | | * doc/lispref/searching.texi (Char Classes): Warn about erroneous usage of named character classes. Suggested by Stephen Leake <stephen_leake@stephe-leake.org>.
* Remove the optional KEEP-ORDER argument to regexp-optMattias Engdegård2020-02-13
| | | | | | | | | | | | | This argument was added for the 'or' clause in rx, but it turned out to be a bad idea (bug#37659), and there seems to be little other use for it. * lisp/emacs-lisp/regexp-opt.el (regexp-opt): Remove KEEP-ORDER. * doc/lispref/searching.texi (Regexp Functions): * etc/NEWS: Remove it from the documentation. * test/lisp/emacs-lisp/regexp-opt-tests.el (regexp-opt-test--match-all) (regexp-opt-test--check-perm, regexp-opt-test--explain-perm) (regexp-opt-keep-order, regexp-opt-longest-match): Simplify test.
* rx: Use longest match for all-string 'or' forms (bug#37659)Mattias Engdegård2020-02-12
| | | | | | | | | | | | | | | | | Revert to the Emacs 26 semantics that always gave the longest match for rx 'or' forms with only string arguments. This guarantee was never well documented, but it is useful and people likely have come to rely on it. For example, prior to this change, (rx (or ">" ">=")) matched ">" even if the text contained ">=". * lisp/emacs-lisp/rx.el (rx--translate-or): Don't tell regexp-opt to preserve the matching order. * doc/lispref/searching.texi (Rx Constructs): Document the longest-match guarantee for all-string 'or' forms. * test/lisp/emacs-lisp/rx-tests.el (rx-or): Update test.
* Update copyright year to 2020Paul Eggert2020-01-01
| | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
* More precise 'regexp-opt' documentationMattias Engdegård2019-12-18
| | | | | | | | * lisp/emacs-lisp/regexp-opt.el (regexp-opt): * doc/lispref/searching.texi (Regexp Functions): Be more specific about how the KEEP-ORDER argument actually works. If nil, the regexp guarantees a longest match; this is the behaviour that many callers implicitly rely on.
* Allow characters and single-char strings in rx charsetsMattias Engdegård2019-12-13
| | | | | | | | | | | | | | | | The `not' and `intersection' forms, and `or' inside these forms, now accept characters and single-character strings as arguments. Previously, they had to be wrapped in `any' forms. This does not add expressive power but is a convenience and is easily understood. * doc/lispref/searching.texi (Rx Constructs): Amend the documentation. * etc/NEWS: Announce the change. * lisp/emacs-lisp/rx.el (rx--charset-p, rx--translate-not) (rx--charset-intervals, rx): Accept characters and 1-char strings in more places. * test/lisp/emacs-lisp/rx-tests.el (rx-not, rx-charset-or) (rx-def-in-charset-or, rx-intersection): Test the change.
* Use `or' instead of `union' for charset union in rxMattias Engdegård2019-12-12
| | | | | | | | | | | | | | Design change suggested by Stefan Monnier. * doc/lispref/searching.texi (Rx Constructs): * etc/NEWS: Document. * lisp/emacs-lisp/rx.el (rx--translate-or): Detect charset arguments. (rx--charset-p): New. (rx--translate-not, rx--charset-intervals, rx--translate-union): Change from `union' to `or'. (rx--translate-form, rx--builtin-forms, rx): Remove `union'. * test/lisp/emacs-lisp/rx-tests.el (rx-union, rx-def-in-union) (rx-intersection): Rename tests and change `union' to `or' and `|'.
* ; Spelling fixesPaul Eggert2019-12-10
|
* Add `union' and `intersection' to rx (bug#37849)Mattias Engdegård2019-12-10
| | | | | | | | | | | | | | | | | | | | | | These character set operations, together with `not' for set complement, improve the compositionality of rx, and reduce duplication in complicated cases. Named character classes are not permitted in set operations. * lisp/emacs-lisp/rx.el (rx--translate-any): Split into multiple functions. (rx--foldl, rx--parse-any, rx--generate-alt, rx--intervals-to-alt) (rx--complement-intervals, rx--intersect-intervals) (rx--union-intervals, rx--charset-intervals, rx--charset-union) (rx--charset-all, rx--charset-intersection, rx--translate-union) (rx--translate-intersection): New. (rx--translate-not, rx--translate-form, rx--builtin-forms, rx): Add `union' and `intersection'. * test/lisp/emacs-lisp/rx-tests.el (rx-union ,rx-def-in-union) (rx-intersection, rx-def-in-intersection): New tests. * doc/lispref/searching.texi (Rx Constructs): * etc/NEWS: Document `union' and `intersection'.
* Spelling fixesPaul Eggert2019-12-09
|