aboutsummaryrefslogtreecommitdiffstats
path: root/doc/lispref/strings.texi (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Correct manual entry for string-lesspMattias Engdegård11 days1-2/+4
| | | | | * doc/lispref/strings.texi (Text Comparison): The old text was wrong: non-ASCII unibyte chars overlap part of Unicode.
* ; Document creation of strings from copies of other stringsEli Zaretskii2026-02-071-0/+11
| | | | | * doc/lispref/strings.texi (Creating Strings): Document how to create a string from N copies of another string. (Bug#80256)
* ; Add 2026 to copyright years.Sean Whitton2026-01-011-1/+1
|
* Don't use the term 'null' for empty stringsMattias Engdegård2025-12-281-8/+8
| | | | | | | | | Zero-length strings are just 'empty'; 'null' can be confusing in several ways. * lisp/subr.el (split-string, string-lines): * doc/lispref/strings.texi (Creating Strings): Change argument names from 'omit-nulls' to 'omit-empty'.
* Clean up split-string documentationMattias Engdegård2025-12-281-61/+13
| | | | | | | | | | | | * doc/lispref/strings.texi (Creating Strings): * lisp/subr.el (split-string): Make it clear that the SEPARATORS argument should not match the empty string, since the behaviour was entirely an artefact of the original implementation in this case; it makes little sense otherwise. Clean up the examples for conciseness and do not waste space on irrelevant details.
* Add binary format specifications '%b' and '%B'Jacob S. Gordon2025-12-221-8/+19
| | | | | | | | | | | | | | | | These produce the binary representation of a number. '%#b' and '%#B' prefix with '0b' and '0B', respectively. (bug#79990) * etc/NEWS: Announce change. * doc/lispref/strings.texi (Formatting Strings): Describe new format specs and add to comment on reconstructing the value with 'read'. * src/editfns.c (format): Update doc string. (styled_format): Add support for '%b' and '%B'. To remain portable, avoid use of 'sprintf' by converting by hand. * test/src/editfns-tests.el (format-binary-zero, format-binary-floats) (format-binary-nonzero-integers): Add tests. (read-large-integer): Add binary test cases. Co-authored-by: Paul Eggert <eggert@cs.ucla.edu>
* ; Revert previous commit.Paul Eggert2025-12-211-5/+4
|
* ; Revert wrong doc change about, e.g., "-#xa".Paul Eggert2025-12-211-4/+5
|
* ; * doc/lispref/strings.texi (Formatting Strings): Corrections.Mattias Engdegård2025-12-211-6/+5
|
* Remove binary-as-unsigned (bug#79990)Paul Eggert2025-12-211-3/+8
| | | | | | This experimental variable caused more trouble than it cured: it was rarely used, and when used it tended to be used incorrectly. * src/editfns.c (binary-as-unsigned): Remove. All uses removed.
* * doc/lispref/strings.texi (Formatting Strings): Cut obsolete text.Mattias Engdegård2025-12-121-4/+2
| | | | Since we got bignums the output is platform-independent.
* Merge from origin/emacs-30Eli Zaretskii2025-10-111-0/+1
|\ | | | | | | | | | | | | | | 1895ba3ba3b ; Document %i format 85db0ac0d6e ; * doc/lispref/nonascii.texi (Explicit Encoding): Fix a ... c119a3600ed ; * doc/lispref/tips.texi (Documentation Tips): Document ... Also fix trailing whitespace in test files.
| * ; Document %i formatEli Zaretskii2025-10-111-0/+1
| | | | | | | | | | | | * src/editfns.c (Fformat): Doc fix. * doc/lispref/strings.texi (Formatting Strings): Document %i.
| * Update copyright year to 2025Stefan Kangas2025-01-021-1/+1
| | | | | | | | Run "TZ=UTC0 admin/update-copyright".
* | Disallow string data resizing (bug#79784)Mattias Engdegård2025-08-241-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only allow string mutation that is certain not to require string data to be resized and reallocated: writing bytes into a unibyte string, and changing ASCII to ASCII in a multibyte string. This ensures that mutation will never transform a unibyte string to multibyte, that the size of a string in bytes never changes, and that the byte offsets of characters remain the same. Most importantly, it removes a long-standing obstacle to reform of string representation and allow for future performance improvements. * src/data.c (Faset): Disallow resizing string mutation. * src/fns.c (clear_string_char_byte_cache): * src/alloc.c (resize_string_data): Remove. * test/src/data-tests.el (data-aset-string): New test. * test/lisp/subr-tests.el (subr--subst-char-in-string): Skip error cases. * test/src/alloc-tests.el (aset-nbytes-change): Remove test that is no longer relevant. * doc/lispref/strings.texi (Modifying Strings): * doc/lispref/sequences.texi (Array Functions): * doc/lispref/text.texi (Substitution): Update manual. * etc/NEWS: Announce.
* | Fix clear-string crash with text propertiesStefan Kangas2025-01-151-2/+3
| | | | | | | | | | | | | | | | * src/fns.c (Fclear_string): Fix crash by clearing all text properties. (Bug#75581) * doc/lispref/strings.texi (Modifying Strings): Document the above behavior change. Fix proposed by Andreas Schwab <schwab@linux-m68k.org>.
* | Update copyright year to 2025Paul Eggert2025-01-011-1/+1
| | | | | | | | Run "TZ=UTC0 admin/update-copyright".
* | Merge from origin/emacs-30Eli Zaretskii2024-11-091-3/+3
|\ \ | |/ | | | | | | | | | | | | | | | | | | 3231af3727b Improve 'open-network-stream' documentation. fb55431c44e ; Fix typos in case-conversion descriptions 83f095d1fd4 ; Fix typo and indexing in the ELisp manual 37b1799c9e5 ; Instrument proced-tests.el further 03fa832b4dc Improve Tramp documentation on direct async processes # Conflicts: # etc/NEWS
| * ; Fix typos in case-conversion descriptionsRobert Pluim2024-11-051-3/+3
| | | | | | | | | | | | * doc/lispref/nonascii.texi (Character Properties): Fix typos. * doc/lispref/strings.texi (Case Conversion): Fix typos. (Case Tables): Fix typos.
* | Merge from origin/emacs-30Eli Zaretskii2024-11-021-5/+26
|\ \ | |/ | | | | f7b85fe986e Improve documentation of letter-case conversions
| * Improve documentation of letter-case conversionsEli Zaretskii2024-11-011-5/+26
| | | | | | | | | | | | | | * doc/lispref/nonascii.texi (Character Properties): * doc/lispref/strings.texi (Case Conversion, Case Tables): Document that special-casing rules override the case-table conversions. (Bug#74155)
* | Merge from origin/emacs-30Eli Zaretskii2024-08-171-0/+9
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5c9de704cc8 ; * admin/make-tarball.txt: Minor copyedits. 3fc16357832 ; * doc/lispref/strings.texi (Text Comparison): Improve i... 45a78ec6c57 * lisp/files.el (require-with-check): Improve error messa... 9a04b99b3d3 ; * src/data.c (Fsubrp): Improve docstring. 4f3e8c3b4ed Improve documentation of ERT ed8904937ec Disambiguate minor-mode variable in its function docstring 505139e0bad Fix project-dired keybinding in manual 9bedb957beb Improve documentation of time-parsing functions # Conflicts: # doc/lispref/os.texi # lisp/calendar/iso8601.el # lisp/calendar/parse-time.el
| * ; * doc/lispref/strings.texi (Text Comparison): Improve indexing.Eli Zaretskii2024-08-161-0/+9
| |
* | Merge from savannah/emacs-30Po Lu2024-08-091-3/+0
|\ \ | |/ | | | | | | | | | | | | a1b8c2610a4 * lisp/help-macro.el: Add 'help-for-help-use-variable-pit... a577eccdbbc ; * doc/lispref/strings.texi (String Conversion): Fix las... d22e52375a6 Remove manual entry for string-to-int 341e5795d5d Support minibuffer-visible-completions in completing-read... 3e30c779a70 * lisp/imenu.el (imenu-flatten): Fix doc about annotation...
| * ; * doc/lispref/strings.texi (String Conversion): Fix last change.Eli Zaretskii2024-08-081-0/+1
| |
| * Remove manual entry for string-to-intUlrich Müller2024-08-081-4/+0
| | | | | | | | | | * doc/lispref/strings.texi (String Conversion): Remove mention of 'string-to-int' which was dropped in Emacs 26. (Bug#72520)
* | Merge from savannah/emacs-30Po Lu2024-08-071-21/+24
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 679f7ccc49f Prevent accesses to /content files without a GUI connection f0a7eec5a7d * lisp/net/tramp-integration.el (shortdoc): Use `tramp--w... fb642d9cf54 Merge branch 'emacs-30' of git.savannah.gnu.org:/srv/git/... f1e37ae423f Avoid crashes in very large buffers with long lines 4dc9e99349d Update description of string comparison functions 3817355aed5 Add sanity check when adding Tramp functions to shortdoc 1bbb3220179 ; * lisp/erc/erc-fill.el (erc-fill-wrap-mode): Doc fix. 3f6e7e1da68 js-ts-mode: Make jsdoc's "description" block a comment (b... 1c7e00f4f65 Also condition cjk-misc font-spec on Android b89d65df5fa ; * etc/PROBLEMS: How to install sources on SUSE Linux (b... 729b17c2026 ; * src/lread.c (Fload): Add comment. (Bug#72433) bfb1aee9989 Fix ':defer nil' in 'use-package' d787817076e Document unsupported color Emoji on OpenBSD db1f749db55 Fix regressions in Customize caused by 'widget-unselected... f94d58008eb Avoid inserting extra space in SVG data 292fcd20099 Fix c-ts-common filling function (bug#71760) e50d597f450 Fix missing type checks before specbind # Conflicts: # lisp/progmodes/c-ts-common.el
| * Update description of string comparison functionsUlrich Müller2024-08-061-21/+24
| | | | | | | | | | | | | | | | * doc/lispref/strings.texi (Text Comparison): Swap descriptions of 'string-equal' (the function) and 'string=' (its alias). Same for 'string-lessp' and 'string<'. Document 'string>'. (Bug#72486) * doc/lispref/sequences.texi (Sequence Functions): Update cross reference to 'string-lessp'.
* | ; Don't use non-ASCII in ELisp manual sources unless necessaryEli Zaretskii2024-07-261-1/+1
|/ | | | | | | | | | | | * doc/lispref/strings.texi: * doc/lispref/parsing.texi: * doc/lispref/nonascii.texi: * doc/lispref/keymaps.texi: * doc/lispref/intro.texi: * doc/lispref/help.texi: * doc/lispref/functions.texi: * doc/lispref/display.texi: * doc/lispref/control.texi: ASCIIfy.
* ; Replace (non-)nil with (non-)@code{nil} in texinfo filesSteven Allen2024-07-151-1/+1
| | | | | | | | | | | | * doc/lispref/functions.texi: * doc/lispref/keymaps.texi: * doc/lispref/strings.texi: * doc/misc/cl.texi: * doc/misc/dbus.texi: * doc/misc/eshell.texi: * doc/misc/message.texi: * doc/misc/ses.texi: * doc/misc/vtable.texi: Replace (non-)nil with (non-)@code{nil}.
* ; * doc/lispref/strings.texi (Creating Strings): Followup to last change.Eli Zaretskii2024-07-061-5/+6
|
* Omit `store-substring` from lisp manual (bug#70784)Mattias Engdegård2024-05-251-17/+1
| | | | | * doc/lispref/strings.texi (Modifying Strings): Remove `store-substring` which is not really useful enough to merit a mention here.
* Use new-style `sort` signature in Lisp manual examplesMattias Engdegård2024-03-291-3/+4
| | | | | | * doc/lispref/help.texi (Accessing Documentation): * doc/lispref/strings.texi (Text Comparison): Use the new sort calling convention (bug#69709).
* Add `value<` (bug#69709)Mattias Engdegård2024-03-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | It's a general-purpose polymorphic ordering function, like `<` but for any two values of the same type. * src/data.c (syms_of_data): Add the `type-mismatch` error. (bits_word_to_host_endian): Move... * src/lisp.h (bits_word_to_host_endian): ...here, and declare inline. * src/fns.c (Fstring_lessp): Extract the bulk of this function to... (string_cmp): ...this 3-way comparison function, for use elsewhere. (bool_vector_cmp, value_cmp, Fvaluelt): New. * lisp/emacs-lisp/byte-opt.el (side-effect-free-fns, pure-fns): Add `value<`, which is pure and side-effect-free. * test/src/fns-tests.el (fns-value<-ordered, fns-value<-unordered) (fns-value<-type-mismatch, fns-value<-symbol-with-pos) (fns-value<-circle, ert-deftest fns-value<-bool-vector): New tests. * doc/lispref/sequences.texi (Sequence Functions): * doc/lispref/numbers.texi (Comparison of Numbers): * doc/lispref/strings.texi (Text Comparison): Document the new value< function. * etc/NEWS: Announce.
* Merge from origin/emacs-29Eli Zaretskii2024-03-231-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | 689f04a2ddf Clarify description of format-spec truncation 759dedfab07 More accurate documentation of 'rmail-mail-new-frame' fa79de7c6b8 ; * lisp/calendar/calendar.el: Remove extra space. 7f6e335f4b4 Fix documentation of M-SPC in user manual 5bdc2436c64 ; * lisp/emacs-lisp/cl-macs.el (cl-labels): Fix stray dif... 8014dbb2ad8 * admin/notes/bugtracker: Minor copyedit. 06a991e7e87 ; * admin/notes/bugtracker: Minor copyedit. c890622e1a9 Tweak regexp for object initializers in csharp-mode (bug#... f48babb1120 `term-mode': mention the keymap to add keybindings to 8cf05d9be12 Fix 'shortdoc-copy-function-as-kill' d5901f3f05e Improve documentation of 'edebug-print-*' variables
| * Clarify description of format-spec truncationBasil L. Contovounesios2024-03-211-1/+1
| | | | | | | | | | | | | | * doc/lispref/strings.texi (Custom Format Strings): Mention that precision specifier affects both '<' and '>' truncation (bug#69822). * lisp/format-spec.el (format-spec, format-spec--do-flags): Use same terminology as 'format', especially when referring to its behavior.
| * Fix typo in lispref "Creating Strings" sectionXiyue Deng2024-01-111-1/+1
| | | | | | | | * doc/lispref/strings.texi (String Basics): Fix typo (bug#68375).
* | Fix typo in lispref "Creating Strings" sectionXiyue Deng2024-01-131-1/+1
| | | | | | | | * doc/lispref/strings.texi (String Basics): Fix typo (bug#68375).
* | Revert "Fix typo in lispref 'Creating Strings' section"Stephen Berman2024-01-111-1/+1
| | | | | | | | | | This reverts commit b825962ea840348bbde0c834ca398458a06fbb8b which was mistakenly installed in master instead of emacs-29.
* | Fix typo in lispref "Creating Strings" sectionXiyue Deng2024-01-111-1/+1
| | | | | | | | * doc/lispref/strings.texi (String Basics): Fix typo.
* | Merge from savannah/emacs-29Po Lu2024-01-021-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dc4e6b13296 ; Update copyright years in more files 64b37776318 ; Run set-copyright from admin.el 8e1c56ae467 ; Add 2024 to copyright years # Conflicts: # doc/misc/modus-themes.org # doc/misc/texinfo.tex # etc/NEWS # etc/refcards/ru-refcard.tex # etc/themes/modus-operandi-theme.el # etc/themes/modus-themes.el # etc/themes/modus-vivendi-theme.el # lib/alloca.in.h # lib/binary-io.h # lib/c-ctype.h # lib/c-strcasecmp.c # lib/c-strncasecmp.c # lib/careadlinkat.c # lib/cloexec.c # lib/close-stream.c # lib/diffseq.h # lib/dup2.c # lib/filemode.h # lib/fpending.c # lib/fpending.h # lib/fsusage.c # lib/getgroups.c # lib/getloadavg.c # lib/gettext.h # lib/gettime.c # lib/gettimeofday.c # lib/group-member.c # lib/malloc.c # lib/md5-stream.c # lib/md5.c # lib/md5.h # lib/memmem.c # lib/memrchr.c # lib/nanosleep.c # lib/save-cwd.h # lib/sha1.c # lib/sig2str.c # lib/stdlib.in.h # lib/strtoimax.c # lib/strtol.c # lib/strtoll.c # lib/time_r.c # lib/xalloc-oversized.h # lisp/auth-source-pass.el # lisp/emacs-lisp/lisp-mnt.el # lisp/emacs-lisp/timer.el # lisp/info-look.el # lisp/jit-lock.el # lisp/loadhist.el # lisp/mail/rmail.el # lisp/net/ntlm.el # lisp/net/webjump.el # lisp/progmodes/asm-mode.el # lisp/progmodes/project.el # lisp/progmodes/sh-script.el # lisp/textmodes/flyspell.el # lisp/textmodes/reftex-toc.el # lisp/textmodes/reftex.el # lisp/textmodes/tex-mode.el # lisp/url/url-gw.el # m4/alloca.m4 # m4/clock_time.m4 # m4/d-type.m4 # m4/dirent_h.m4 # m4/dup2.m4 # m4/euidaccess.m4 # m4/fchmodat.m4 # m4/filemode.m4 # m4/fsusage.m4 # m4/getgroups.m4 # m4/getloadavg.m4 # m4/getrandom.m4 # m4/gettime.m4 # m4/gettimeofday.m4 # m4/gnulib-common.m4 # m4/group-member.m4 # m4/inttypes.m4 # m4/malloc.m4 # m4/manywarnings.m4 # m4/mempcpy.m4 # m4/memrchr.m4 # m4/mkostemp.m4 # m4/mktime.m4 # m4/nproc.m4 # m4/nstrftime.m4 # m4/pathmax.m4 # m4/pipe2.m4 # m4/pselect.m4 # m4/pthread_sigmask.m4 # m4/readlink.m4 # m4/realloc.m4 # m4/sig2str.m4 # m4/ssize_t.m4 # m4/stat-time.m4 # m4/stddef_h.m4 # m4/stdint.m4 # m4/stdio_h.m4 # m4/stdlib_h.m4 # m4/stpcpy.m4 # m4/strnlen.m4 # m4/strtoimax.m4 # m4/strtoll.m4 # m4/time_h.m4 # m4/timegm.m4 # m4/timer_time.m4 # m4/timespec.m4 # m4/unistd_h.m4 # m4/warnings.m4 # nt/configure.bat # nt/preprep.c # test/lisp/register-tests.el
| * ; Add 2024 to copyright yearsPo Lu2024-01-021-1/+1
| |
* | ; Fix last change (bug#66614).Eli Zaretskii2023-10-291-8/+7
| |
* | Add 'case-symbols-as-words' to configure symbol case behaviorSpencer Baugh2023-10-291-2/+6
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | In some programming languages and styles, a symbol (or every symbol in a sequence of symbols) might be capitalized, but the individual words making up the symbol should never be capitalized. For example, in OCaml, type names Look_like_this and variable names look_like_this, but it is basically never correct for something to Look_Like_This. And one might have "aa_bb cc_dd ee_ff" or "Aa_bb Cc_dd Ee_ff", but never "Aa_Bb Cc_Dd Ee_Ff". To support this, the new variable 'case-symbols-as-words' causes symbol constituents to be treated as part of words only for case operations. * src/casefiddle.c (case_ch_is_word): New function. (case_character_impl, case_character): Use 'case_ch_is_word'. (syms_of_casefiddle): Define 'case-symbols-as-words'. * src/search.c (Freplace_match): Use 'case-symbols-as-words' when calculating case pattern. * test/src/casefiddle-tests.el (casefiddle-tests--check-syms) (casefiddle-case-symbols-as-words): Test 'case-symbols-as-words'. * etc/NEWS: Announce 'case-symbols-as-words'. * doc/lispref/strings.texi (Case Conversion): Document 'case-symbols-as-words'. (Bug#66614)
* * doc/lispref/strings.texi (Text Comparison): Fix typo (bug#65799).Sebastian Miele2023-09-071-1/+1
|
* ; Fix minor mistakes in documentationIkumi Keita2023-01-181-2/+2
| | | | | | | | * 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-011-1/+1
|
* Improve documentation of locale-specific string comparisonEli Zaretskii2022-11-231-10/+22
| | | | | | * 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-021-1/+1
|
* Rectify string= documentationMattias Engdegård2022-09-301-15/+4
| | | | | * doc/lispref/strings.texi (Text Comparison): Describe the current behaviour since about 20 years back.