aboutsummaryrefslogtreecommitdiffstats
path: root/test/lisp/misc-tests.el (follow)
Commit message (Collapse)AuthorAgeFilesLines
* ; Minor changes to 'truncate-string-pixelwise' (bug#80244)Stéphane Marks2026-02-071-0/+10
| | | | Fix two bugs and add tests for them.
* New function 'truncate-string-pixelwise' (bug#80244)Stéphane Marks2026-01-311-0/+80
| | | | | | | | | | | | | | | This function will truncate a string on a pixelwise basis in a work buffer and using a binary search rather than brute force. * lisp/emacs-lisp/subr-x.el (work-buffer--prepare-pixelwise): New defun helper function. (string-pixel-width): Use the helper function. (truncate-string-pixelwise): New defun. * test/lisp/misc-tests.el (misc-test-truncate-string-pixelwise): (misc-test-truncate-string-pixelwise-unicode): New test. * doc/lispref/display.texi (Size of Displayed Text): Document the function. * etc/NEWS: Announce the function.
* ; Add 2026 to copyright years.Sean Whitton2026-01-011-1/+1
|
* Fix `string-pixel-width' with alternate text propertiesDavid Ponce2025-03-201-0/+64
| | | | | | | | | | | | Fix possible wrong result of `string-pixel-width' with alternate and default properties. Create new regression tests. * lisp/emacs-lisp/subr-x.el (string-pixel-width): Like for `face-remapping-alist', use in work buffer the value of `char-property-alias-alist' and `default-text-properties' local to the passed buffer, to correctly compute pixel width. (Bug#77042) * test/lisp/misc-tests.el: Add tests for `string-pixel-width'.
* Update copyright year to 2025Paul Eggert2025-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright".
* 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
| |
| * ; * test/lisp/misc-tests.el (ert): require misc to avoid warningMattias Engdegård2023-07-011-0/+1
| |
| * * lisp/misc.el (duplicate-line-final-position): New defcustom (bug#64185).Juri Linkov2023-06-291-0/+14
| | | | | | | | | | | | | | | | | | * lisp/misc.el (duplicate-line): Use it. * test/lisp/misc-tests.el (misc--duplicate-line): Add tests for duplicate-line-final-position. Don't merge to master.
* | Add duplicate-region-final-position (bug#64185)Mattias Engdegård2023-07-011-33/+64
| | | | | | | | | | | | | | | | * lisp/misc.el (duplicate-region-final-position): New defcustom. (duplicate-dwim): Use it. * lisp/rect.el (rectangle--duplicate-right): Add displacement argument. * test/lisp/misc-tests.el (misc--duplicate-dwim): Extend test.
* | * lisp/misc.el (duplicate-line-final-position): New defcustom (bug#64185).Juri Linkov2023-06-291-0/+14
|/ | | | | | | * lisp/misc.el (duplicate-line): Use it. * test/lisp/misc-tests.el (misc--duplicate-line): Add tests for duplicate-line-final-position.
* ; Add 2023 to copyright years.Eli Zaretskii2023-01-011-1/+1
|
* Add duplicate-dwim (bug#56418)Mattias Engdegård2022-07-261-0/+38
| | | | | | | | | | | | Like duplicate-line but duplicates the region instead if active. Rectangular regions are duplicated on the right-hand side. The region remains active afterwards, to facilitate further duplication or other operations on the same text. * lisp/rect.el (rectangle--duplicate-right): * lisp/misc.el (duplicate-dwim): New. * test/lisp/misc-tests.el (misc--duplicate-dwim): New test. * etc/NEWS: Announce.
* duplicate-line: fix optional argument and add test (bug#46621)Mattias Engdegård2022-06-221-0/+16
| | | | | | | | | The test assumes that the current semantics are intended and desired, which may or may not be true, but it's better than not having any at all. * lisp/misc.el (duplicate-line): Don't crash if called with no argument. * test/lisp/misc-tests.el (misc--duplicate-line): New test.
* zap-to-char: case sensitive for upper-case charactersTino Calancha2022-05-211-1/+8
| | | | | | | | | | | | | | | | | In interactive calls, behave case-sensitively if the given char is an upper-case character. Same for zap-up-to-char (Bug#54804). This is analog to what the user-level incremental search feature does. * lisp/misc.el (zap-up-to-char): Add an optional arg INTERACTIVE. Perform a case-sensitive search when INTERACTIVE is non-nil and CHAR is an upper-case character. * lisp/simple.el (zap-to-char): Same. * etc/NEWS (Editing Changes in Emacs 29.1): Announce this change. * test/lisp/misc-tests.el (misc-test-zap-up-to-char): Add test cases. * test/lisp/simple-tests.el (with-zap-to-char-test): Add helper macro. (simple-tests-zap-to-char): Add a test.
* ; Add 2022 to copyright years.Eli Zaretskii2022-01-011-1/+1
|
* Update copyright year to 2021Paul Eggert2021-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright".
* Use lexical-binding in misc.el and add testsStefan Kangas2020-04-261-0/+77
* lisp/misc.el: Use lexical-binding. * test/lisp/misc-tests.el: New file.