summaryrefslogtreecommitdiff
path: root/doc/lispref/strings.texi
Commit message (Collapse)AuthorAge
* ; Fix minor mistakes in documentationIkumi Keita2023-01-18
| | | | | | | | * lisp/emacs-lisp/cl-macs.el (cl-letf): Correct Info reference. * doc/lispref/strings.texi (String Conversion): Fix typo. (Bug#60926)
* ; Add 2023 to copyright years.Eli Zaretskii2023-01-01
|
* Improve documentation of locale-specific string comparisonEli Zaretskii2022-11-23
| | | | | | * doc/lispref/strings.texi (Text Comparison): * src/fns.c (Fstring_collate_equalp): Improve documentation of 'string-collate-equalp' and 'string-collate-lessp'. (Bug#59275)
* ; Fix typoJuri Linkov2022-11-02
|
* Rectify string= documentationMattias Engdegård2022-09-30
| | | | | * doc/lispref/strings.texi (Text Comparison): Describe the current behaviour since about 20 years back.
* Make format-spec accept function substitutionsStefan Kangas2022-09-29
| | | | | | | | | * lisp/format-spec.el (format-spec): Accept a function producing the substitution for a character. * doc/lispref/strings.texi (Custom Format Strings): Document the above change. * test/lisp/format-spec-tests.el (format-spec/function): New test. Ref. https://lists.gnu.org/r/emacs-devel/2022-09/msg01875.html
* Add missing @end defun to strings.texiLars Ingebrigtsen2022-07-26
| | | | * doc/lispref/strings.texi (Text Comparison): Add missing @end defun.
* string-equal-ignore-case: new functionSam Steingold2022-07-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/cedet/semantic/complete.el (semantic-collector-calculate-completions): Use `string-prefix-p' instead of explicit `compare-strings'. * lisp/emacs-lisp/byte-opt.el (side-effect-free-fns): Add `string-equal-ignore-case'. * lisp/emacs-lisp/cl-extra.el (cl-equalp): Use `string-equal-ignore-case'. * lisp/emacs-lisp/shadow.el (load-path-shadows-find): Likewise. * lisp/emacs-lisp/shortdoc.el (string): Add `string-equal-ignore-case'. * lisp/files.el (file-truename): Use `string-equal-ignore-case'. (file-relative-name): Likewise. * lisp/gnus/gnus-art.el (article-hide-boring-headers): Use `string-equal-ignore-case' instead of `gnus-string-equal'. * lisp/gnus/gnus-util.el (gnus-string-equal): Remove, use `string-equal-ignore-case' instead. * lisp/international/mule-cmds.el (describe-language-environment): Use `string-equal-ignore-case'. (locale-charset-match-p): Likewise. * lisp/man.el (Man-softhyphen-to-minus): Use `string-prefix-p'. * lisp/minibuffer.el (completion--string-equal-p): Remove, use `string-equal-ignore-case' instead. (completion--twq-all): Use `string-equal-ignore-case'. (completion--do-completion): Likewise. * lisp/net/browse-url.el (browse-url-default-windows-browser): Use `string-prefix-p' instead of explicit `compare-strings'. * lisp/org/ob-core.el (org-babel-results-keyword): Use `string-equal-ignore-case' instead of explicit `compare-strings'. (org-babel-insert-result): Likewise. * lisp/org/org-compat.el (string-equal-ignore-case): Define unless defined already. (org-mode-flyspell-verify): Use `string-equal-ignore-case'. * lisp/org/org-lint.el (org-lint-duplicate-custom-id): Likewise. * lisp/org/ox.el (org-export-resolve-radio-link): Use `string-equal-ignore-case' and `string-clean-whitespace'. * lisp/progmodes/flymake-proc.el (flymake-proc--check-patch-master-file-buffer): Use `string-prefix-p' instead of explicit `compare-strings'. * lisp/progmodes/idlwave.el (idlwave-class-or-superclass-with-tag): Use `string-equal-ignore-case' instead of explicit `compare-strings'. * lisp/subr.el (member-ignore-case): Use `string-equal-ignore-case'. (string-equal-ignore-case): Compare strings ignoring case. * lisp/textmodes/bibtex.el (bibtex-string=): Remove. (bibtex-format-entry, bibtex-font-lock-url, bibtex-autofill-entry) (bibtex-print-help-message, bibtex-validate, bibtex-validate-globally) (bibtex-clean-entry, bibtex-completion-at-point-function, (bibtex-url): Use `string-equal-ignore-case' instead of `bibtex-string='. * lisp/textmodes/sgml-mode.el (sgml-get-context): Use `string-equal-ignore-case' instead of explicit `compare-strings'. (sgml-calculate-indent): Likewise * test/lisp/subr-tests.el (string-comparison-test): Add tests for `string-equal-ignore-case'.
* Merge from origin/emacs-28Stefan Kangas2022-07-23
|\ | | | | | | | | | | | | | | | | | | | | ae1ace1cf4 Adjust help-fns.el tests for recent change 04bdcf4aaa * src/terminal.c (Fframe_terminal): Use active voice 7fa491a9e9 Improve 'terminal-live-p' docstring some more b9ac8c29ae Improve terminal-live-p docstring 0b4c81a152 * lisp/net/tramp-gvfs.el (tramp-gvfs-dbus-event-vector): F... 8f8373170f * lisp/progmodes/cperl-mode.el: Don't mention obsolete arc... 25bc330a6d Make 'describe-function' say "byte-compiled" when appropriate 2b31e667be ;Improve documentation of locale-specific string comparison
| * ;Improve documentation of locale-specific string comparisonEli Zaretskii2022-07-21
| | | | | | | | | | * doc/lispref/strings.texi (Text Comparison): Mention the Unicode collation rules and buffer-local case-tables.
* | Merge from origin/emacs-28Stefan Kangas2022-06-10
|\| | | | | | | | | | | | | | | | | | | | | | | d02c94090c Fix error reporting in process-async-https-with-delay 9a4862a973 * doc/misc/org.org: Remove spurious markup. 768ed1476a Make Tramp version check more robust 7f778c6943 Fix debugging with GDB when a breakpoint has multiple loca... 25e53e9391 ; * lisp/files.el (file-expand-wildcards): Doc fix. 3ea9357d10 Update documentation of 'aset' and 'store-substring' # Conflicts: # lisp/files.el
| * Update documentation of 'aset' and 'store-substring'Eli Zaretskii2022-06-05
| | | | | | | | | | | | | | * doc/lispref/strings.texi (Modifying Strings): Adjust to implementation changes: it is possible for the modified string to have fewer or more bytes than the original. Add recommendations regarding unibyte vs multibyte strings and characters. (Bug#55801)
* | Merge from origin/emacs-28Stefan Kangas2022-06-05
|\| | | | | | | | | | | | | | | | | | | | | | | 1b8719835a Update to Org 9.5.4 92c5faafd7 Clarify documentation of 'string-to-unibyte' 2848512654 ; * lisp/files.el (find-file): Avoid too short lines in do... 672f9f787f Improve keystrokes in doc strings in some find-file functions ef5651cc77 Fix segfaults when starting on 80x26 TTY frames bfa647972f ; Fix doc string of 'delete-selection-repeat-replace-region' a95d46e00f Make it explicit that a couple of _s in lispref are unders... 5c74c25123 Remove from FAQ the MS-Windows info about BDF fonts edb48646f2 Fix Display Property manual example
| * Make it explicit that a couple of _s in lispref are underscoresLars Ingebrigtsen2022-06-01
| | | | | | | | | | | | * doc/lispref/strings.texi (Custom Format Strings): * doc/lispref/control.texi (pcase Macro): Make it explicit that it's an underscore (bug#55742).
* | Merge from origin/emacs-28Stefan Kangas2022-05-29
|\| | | | | | | | | | | | | f9ee83bfb9 do_switch_frame: before leaving mini-window, check other (... 908e2e09d0 Fix commands used to produce on-line HTML docs fff770fb97 Fix a bad cross-reference in elisp.pdf ebea3415b0 Fix documentation of 'string-pad'
| * Fix documentation of 'string-pad'Eli Zaretskii2022-05-28
| | | | | | | | | | * doc/lispref/strings.texi (Creating Strings): Fix description of 'string-pad'. (Bug#55688)
* | Merge from origin/emacs-28Stefan Kangas2022-05-10
|\| | | | | | | | | | | | | 7b4bdf7b9b Remove the AUCTeX subsection from MS-Windows FAQ d2a5631552 Update AUCTeX FAQ entry 177718bc6d Update string-to-number documentation to bignum Emacs 74cc3b525f Fix doc string references to tags-loop-continue
| * Update string-to-number documentation to bignum EmacsLars Ingebrigtsen2022-05-09
| | | | | | | | | | * doc/lispref/strings.texi (String Conversion): string-to-number no longer converts integers to floating point numbers (bug#55334).
* | ; * doc/lispref/strings.texi (Creating Strings): Fix a typo.Eli Zaretskii2022-04-30
| |
* | Add a KEEP-NEWLINES argument to string-linesLars Ingebrigtsen2022-04-30
| | | | | | | | | | | | * doc/lispref/strings.texi (Creating Strings): Document it. * lisp/subr.el (string-lines): Add a KEEP-NEWLINES argument.
* | 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
| |
* | Move the documentation of 'string-glyph-split' to proper placeEli Zaretskii2021-10-30
| | | | | | | | | | | | * doc/lispref/strings.texi (Creating Strings): Move the description of 'string-glyph-split' from here... * doc/lispref/display.texi (Size of Displayed Text): ...to here.
* | Add new function string-glyph-splitLars Ingebrigtsen2021-10-30
|/ | | | | | | * doc/lispref/strings.texi (Creating Strings): Document it. * lisp/emacs-lisp/shortdoc.el (string): Mention it. * lisp/emacs-lisp/subr-x.el (string-glyph-split): New function.
* Improve documentation of string truncation APIsEli Zaretskii2021-10-30
| | | | | | | | | | | * doc/lispref/display.texi (Size of Displayed Text): * lisp/international/mule-util.el (truncate-string-to-width): Document caveats of using 'truncate-string-to-width' when character composition is involved. * lisp/emacs-lisp/subr-x.el (string-limit): * doc/lispref/strings.texi (Creating Strings): Improve the documentation of 'string-limit'.
* ; 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.
* Move string-trim functions to subr.elLars Ingebrigtsen2021-03-24
| | | | | | | | | | | | * doc/lispref/strings.texi (Creating Strings): Document them. * lisp/faces.el: Don't require subr-x, because that leads to build errors. * lisp/subr.el (string-trim, string-trim-right) (string-trim-left): Move here from subr-x.el. * lisp/emacs-lisp/shortdoc.el (string): Adjust.
* Merge from origin/emacs-27Glenn Morris2021-01-04
|\ | | | | | | a7c2793efe Fix last change
| * Fix last changeEli Zaretskii2021-01-02
| | | | | | | | | | * doc/lispref/strings.texi (Creating Strings): Improve wording of last change. (Bug#45516)
| * Add a reference between the Strings node and Search/ReplaceLars Ingebrigtsen2021-01-02
| | | | | | | | | | | | | | * doc/lispref/strings.texi (Creating Strings): Mention string-replace/replace-regexp-in-string (bug#45516). (cherry picked from commit b9359d4183a1a6923122d3aa12b922ab89693354)
| * Update copyright year to 2021Paul Eggert2021-01-01
| | | | | | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
| * Correct 'concat' manual entry (bug#42296)Mattias Engdegård2020-07-11
| | | | | | | | | | | | * doc/lispref/strings.texi (Creating Strings): 'concat' does not necessarily return a newly allocated string. This has been the case at least since 1997 (Emacs 20.3).
* | Update copyright year to 2021Paul Eggert2021-01-01
| | | | | | | | Run "TZ=UTC0 admin/update-copyright".
* | Add a SPLIT parameter to `format-spec'Lars Ingebrigtsen2020-12-29
| | | | | | | | | | | | | | * doc/lispref/strings.texi (Custom Format Strings): Document it. * lisp/format-spec.el (format-spec): Add an optional parameter to return a list of strings (bug#33740).
* | Add a reference between the Strings node and Search/ReplaceLars Ingebrigtsen2020-12-29
| | | | | | | | | | * doc/lispref/strings.texi (Creating Strings): Mention string-replace/replace-regexp-in-string (bug#45516).
* | Allow `string-limit' to work on encoded stringsLars Ingebrigtsen2020-12-25
| | | | | | | | | | | | | | * doc/lispref/strings.texi (Creating Strings): Document it. * lisp/emacs-lisp/subr-x.el (string-limit): Allow limiting on encoded strings.
* | Remove `string-slice' -- it's not very well definedLars Ingebrigtsen2020-12-25
| | | | | | | | | | | | * doc/lispref/strings.texi (Creating Strings): Ditto. * lisp/emacs-lisp/subr-x.el (string-slice): Remove.
* | Make string-pad take an optional START parameterLars Ingebrigtsen2020-12-22
| | | | | | | | | | * lisp/emacs-lisp/subr-x.el (string-pad): Alter the calling convention.
* | Change the string-limit parameter semanticsLars Ingebrigtsen2020-12-22
| | | | | | | | | | * lisp/emacs-lisp/subr-x.el (string-limit): Alter the calling convention.
* | Add string-chop-newlineLars Ingebrigtsen2020-12-21
| | | | | | | | | | * doc/lispref/strings.texi (Creating Strings): Document it. * lisp/emacs-lisp/subr-x.el (string-chop-newline): Add new function.
* | Rename slice-string to string-sliceLars Ingebrigtsen2020-12-21
| | | | | | | | | | * lisp/emacs-lisp/subr-x.el (string-slice): Rename from slice-string. * doc/lispref/strings.texi (Creating Strings): Ditto.
* | Add `string-pad'Lars Ingebrigtsen2020-12-21
| | | | | | | | | | | | | | * doc/lispref/strings.texi (Creating Strings): Document it. * lisp/emacs-lisp/shortdoc.el (string): Add example. * lisp/emacs-lisp/subr-x.el (string-pad): New function.
* | Beef up the Emacs string utility set a bitLars Ingebrigtsen2020-12-21
| | | | | | | | | | | | | | | | | | * doc/lispref/strings.texi (Modifying Strings): Document them. * lisp/emacs-lisp/shortdoc.el (string): Add examples. * lisp/emacs-lisp/subr-x.el (string-clean-whitespace) (string-fill, string-limit, string-lines, slice-string): New functions.
* | string-search robustness and documentation improvement (bug#43598)Mattias Engdegård2020-09-25
| | | | | | | | | | | | | | | | * src/fns.c (Fstring_search): Check START-POS argument range. Simplify logic. Improve doc string. * test/src/fns-tests.el (string-search): Add test cases. * doc/lispref/strings.texi (Text Comparison): Elaborate. * lisp/emacs-lisp/byte-opt.el (pure-fns): Mark string-search as pure.
* | Add a new function 'string-search'Lars Ingebrigtsen2020-09-25
| | | | | | | | | | * doc/lispref/strings.texi (Text Comparison): Document it. * src/fns.c (Fstring_search): New function.
* | Correct 'concat' manual entry (bug#42296)Mattias Engdegård2020-07-11
| | | | | | | | | | | | * doc/lispref/strings.texi (Creating Strings): 'concat' does not necessarily return a newly allocated string. This has been the case at least since 1997 (Emacs 20.3).
* | Fix and extend format-spec (bug#41758)Basil L. Contovounesios2020-06-18
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/format-spec.el: Use lexical-binding. Remove dependence on subr-x.el. (format-spec-make): Clarify docstring. (format-spec--parse-modifiers): Rename to... (format-spec--parse-flags): ...this and simplify. In particular, don't bother parsing :space-pad which is redundant and unused. (format-spec--pad): Remove, replacing with... (format-spec--do-flags): ...this new helper function which performs more of format-spec's supported text manipulation. (format-spec): Autoload. Allow optional argument to take on special values 'ignore' and 'delete' for more control over what happens when a replacement for a format specification isn't provided. Bring back proper support for a precision modifier similar to that of 'format'. * lisp/battery.el (battery-format): Rewrite in terms of format-spec. (battery-echo-area-format, battery-mode-line-format): Mention support of format-spec syntax in docstrings. * doc/lispref/strings.texi (Custom Format Strings): * etc/NEWS: Document and announce these changes. * lisp/dired-aux.el (dired-do-compress-to): * lisp/erc/erc-match.el (erc-log-matches): * lisp/erc/erc.el (erc-update-mode-line-buffer): * lisp/gnus/gnus-sieve.el (gnus-sieve-update): * lisp/gnus/gssapi.el (open-gssapi-stream): * lisp/gnus/mail-source.el (mail-source-fetch-file) (mail-source-fetch-directory, mail-source-fetch-pop) (mail-source-fetch-imap): * lisp/gnus/message.el (message-insert-formatted-citation-line): * lisp/image-dired.el: * lisp/net/eww.el: * lisp/net/imap.el (imap-kerberos4-open, imap-gssapi-open) (imap-shell-open): * lisp/net/network-stream.el (network-stream-open-shell): * lisp/obsolete/tls.el (open-tls-stream): * lisp/textmodes/tex-mode.el: Remove extraneous loads and autoloads of format-spec now that it is autoloaded and simplify its uses where possible. * test/lisp/battery-tests.el (battery-format): Test new format-spec support. * test/lisp/format-spec-tests.el (test-format-spec): Rename to... (format-spec) ...this, extending test cases. (test-format-unknown): Rename to... (format-spec-unknown): ...this, extending test cases. (test-format-modifiers): Rename to... (format-spec-flags): ...this. (format-spec-make, format-spec-parse-flags, format-spec-do-flags) (format-spec-do-flags-truncate, format-spec-do-flags-pad) (format-spec-do-flags-chop, format-spec-do-flags-case): New tests.
* Improve format-spec documentation (bug#41571)Basil L. Contovounesios2020-06-02
| | | | | | | | | * doc/lispref/text.texi (Interpolated Strings): Move from here... * doc/lispref/strings.texi (Custom Format Strings): ...to here, renaming the node and clarifying the documentation. (Formatting Strings): End node with sentence referring to the next one. * lisp/format-spec.el (format-spec): Clarify docstring.
* Don’t use “constant” for values you shouldn’t changePaul Eggert2020-05-16
| | | | | | | | | | | | | | | | | | | | Inspired by patch proposed by Dmitry Gutov (Bug#40671#393) and by further comments by him and by Michael Heerdegen in the same bug report. * doc/lispintro/emacs-lisp-intro.texi (setcar): Don’t push mutability here. * doc/lispref/eval.texi (Self-Evaluating Forms, Quoting) (Backquote): * doc/lispref/lists.texi (Modifying Lists): * doc/lispref/objects.texi (Lisp Data Types, Mutability): * doc/lispref/sequences.texi (Array Functions, Vectors): * doc/lispref/strings.texi (String Basics, Modifying Strings): Don’t use the word “constant” to describe all values that a program should not change. * doc/lispref/objects.texi (Mutability): Rename from “Constants and Mutability”. All uses changed. In a footnote, contrast the Emacs behavior with that of Common Lisp, Python, etc. for clarity, and say the goal is to be nicer.
* Improve mutability documentationPaul Eggert2020-04-19
| | | | | | | | | | | | | This change was inspired by comments from Štěpán Němec in: https://lists.gnu.org/r/emacs-devel/2020-04/msg01063.html * doc/lispref/objects.texi (Lisp Data Types): Mention mutability. (Constants and mutability): New section. * doc/lispintro/emacs-lisp-intro.texi (Lists diagrammed) (Indent Tabs Mode): Improve wording. * doc/lispref/eval.texi (Self-Evaluating Forms): Say that they return constants. * doc/lispref/lists.texi (Sets And Lists): Fix memql mistake/confusion that I recently introduced.