aboutsummaryrefslogtreecommitdiffstats
path: root/doc/lispref (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Improve the error APIStefan Monnier28 hours1-6/+35
| | | | | | | | | | | | | | | | | | | | Define new functions to manipulate error descriptors and add support for `signal` to *re*signal a previous error. * src/eval.c (Fsignal): Make the second arg optional and document the possibility of passing a whole error descriptor to re-signal it. (signal_or_quit): Fix a few corner case issues when DATA is `nil` and ERROR_SYMBOL is an error descriptor. * lisp/subr.el (error-type-p, error--p, error-type, error-data) (error-has-type-p, error-slot-value): New function. * doc/lispref/control.texi (Handling Errors): Prefer "error descriptor" to "error description". Use the new single-arg call to `signal` to re-throw an error. Document `error-type`, `error-data` and `error-slot-value`. (Error Symbols): Document the new functions `error-type-p` and `error-has-type-p`.
* ; Move unfill-paragraph to fill.el. Document it in (elisp)Filling.Sean Whitton4 days1-0/+10
|
* ; * doc/lispref/control.texi (Conditionals): Improve explanation.Sean Whitton5 days1-1/+2
|
* Make 'frame-use-time' more reliable. (bug#80397)Stéphane Marks5 days1-27/+54
| | | | | | | | | | | | | Walking the window tree is more reliable than using the selected window. Implement 'get-mru-frame' on top of 'get-mru-frames' using 'frame-use-time'. * lisp/frame.el (frame-use-time): Change to walk the window tree for the specified frame. (get-mru-frames): New defun. (get-mru-frame): Change to call 'get-mru-frames'. * doc/lispref/frames.texi: Update documentation. * etc/NEWS: Update announcement.
* Rename 'any' to 'member-if' and deprecate 'cl-member-if'Sean Whitton6 days1-4/+10
| | | | | | | | | | | | * lisp/subr.el (any): Rename from this ... (member-if): ... to this. All uses changed. (any): New function alias. * lisp/emacs-lisp/cl-seq.el (cl-member-if): Mark obsolete. * lisp/obsolete/cl.el (member-if): Delete obsolete function alias. * doc/lispref/lists.texi (List Elements): * doc/misc/cl.texi (Lists as Sets): * etc/NEWS: Document the change.
* Revert "Rename 'any' to 'member-if' and deprecate 'cl-member-if'"Mattias Engdegård6 days1-10/+4
| | | | | | This reverts commit 2bdf15f6d8293b21234cd236f39ce68f62e1f6c3. There is no consensus for this change.
* ; * doc/lispref/control.texi (Conditionals): Improve example.Sean Whitton7 days1-2/+2
|
* Rename 'any' to 'member-if' and deprecate 'cl-member-if'Sean Whitton7 days1-4/+10
| | | | | | | | | | | | | | * lisp/subr.el (any): Rename from this ... (member-if): ... to this. All uses changed. Implement '&key KEY-FN' for backwards compatibility. (any): New function alias. * lisp/emacs-lisp/cl-seq.el (cl-member-if): Make an alias for 'member-if'. * lisp/obsolete/cl.el (member-if): Delete obsolete function alias. * doc/lispref/lists.texi (List Elements): * doc/misc/cl.texi (Lists as Sets): * etc/NEWS: Document the change.
* ; Fix documentation of recent changes in treesit.elEli Zaretskii7 days1-11/+11
| | | | | | * etc/NEWS: * doc/lispref/parsing.texi (User-defined Things): Fix punctuation, markup and typos.
* ; Suggest not using if-let* and friends to bind never-nil values.Sean Whitton7 days1-0/+27
|
* Make tree-sitter thing navigation handle nested parsersYuan Fu7 days1-5/+33
| | | | | | | | | | | | | | | | | | | | | | | Not a bug report, but this is from the emacs-devel thread "Tree-sitter: Transcendental things". Improve tree-sitter thing navigation functions to handle the case where there are multiple nested parsers in the buffer. Previously these functions just grab the node at point and are limited to the parser of that node. Now these functions will thoUrouly search through all parsers that covers point before giving up. * doc/lispref/parsing.texi: Mention the change. * lisp/treesit.el (treesit--some): New macro. (treesit--thing-sibling): Use the new macro, add a new PARSER parameter. (treesit-thing-prev): (treesit-thing-next): Add PARSER parameter. (treesit-thing-at): (treesit-navigate-thing): Use the new macro, add a new PARSER parameter. Also pass the PARSER arg to recursive calls and calls to treesit-thing-prev, etc.
* Don’t stuff keyboard input uselesslyPaul Eggert9 days1-9/+9
| | | | | | | Also, document stuffing better. * src/keyboard.c (stuff_buffered_input): Give up on stuffing if it fails. * src/sysdep.c (stuff_char): Return failure indication.
* Correct manual entry for string-lesspMattias Engdegård9 days1-2/+4
| | | | | * doc/lispref/strings.texi (Text Comparison): The old text was wrong: non-ASCII unibyte chars overlap part of Unicode.
* Document that string ARG of 'kill-emacs' might not workEli Zaretskii10 days1-1/+4
| | | | | | * src/emacs.c (Fkill_emacs): * doc/lispref/os.texi (Killing Emacs): Document that EXIT-DATA being a string doesn't always work. (Bug#80435)
* ; Fix the documentation of 'overlays-in' etc.Eli Zaretskii10 days1-1/+10
| | | | | | | | * src/buffer.c (Foverlays_in): * lisp/subr.el (remove-overlays): * doc/lispref/display.texi (Finding Overlays, Managing Overlays): * etc/NEWS: Improve the documentation of recent changes in behavior of 'overlays-in' and 'remove-overlays'. (Bug#80242)
* New function multiple-command-partition-argumentsSean Whitton12 days2-2/+62
| | | | | | | | | * lisp/subr.el (command-line-max-length): New variable. (multiple-command-partition-arguments): New function. * doc/lispref/processes.texi (Shell Arguments): * etc/NEWS: Document them. * test/lisp/subr-tests.el (subr-multiple-command-partition-arguments): New test.
* Compare circular lists in 'equal' without error (bug#80456)Mattias Engdegård14 days1-4/+2
| | | | | | | | | | | | | | | | | | * src/lisp.h (FOR_EACH_TAIL_INTERNAL): Divvy up the code into... (FOR_EACH_TAIL_BASIC, FOR_EACH_TAIL_STEP_CYCLEP): ...these macros, so that they can be used in more flexible ways. * src/fns.c (internal_equal_1): Detect circular lists and call... (internal_equal_cycle): ...this function that keeps comparing but now detecting cycles in the other argument. * lisp/emacs-lisp/testcover.el (testcover-after): Remove unnecessary error handling. * test/src/fns-tests.el (test-cycle-equal): Adapt and extend. * test/lisp/emacs-lisp/testcover-resources/testcases.el (testcover-testcase-cyc1): Remove case that no longer applies. * doc/lispref/objects.texi (Equality Predicates): Update. * etc/NEWS: Announce.
* Add SHA-3 support to secure-hashCollin Funk2026-02-231-11/+24
| | | | | | | | | | | | | | | | | | | | | | | * admin/merge-gnulib (GNULIB_MODULES): Add crypto/sha3-buffer. * lib/sha3.c: New file, imported by running admin/merge-gnulib. * lib/sha3.h: Likewise. * m4/sha3.m4: Likewise. * lib/gnulib.mk.in: Updated by admin/merge-gnulib. * m4/gnulib-comp.m4: Likewise. * src/fns.c: Include sha3.h (Fsecure_hash_algorithms): Add Qsha3_224, Qsha3_256, Qsha3_384, and Qsha3_512. (secure_hash): Likewise. (Fsecure_hash): List the SHA-3 algorithms in the docstring. (syms_of_fns): Define Qsha3_224, Qsha3_256, Qsha3_384, and Qsha3_512. * test/lisp/net/gnutls-tests.el (gnutls-tests-internal-macs-upcased): Filter out the new SHA-3 algorithms since they are currently not implemented in gnutls. * test/src/fns-tests.el (test-secure-hash): Add test cases for the new algorithms. * doc/lispref/text.texi (Checksum/Hash): List the SHA-3 algorithms. Mention that they are considered secure. * etc/NEWS: Mention the new feature.
* ; Make the document language in Info manuals explicitly statedEli Zaretskii2026-02-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/misc/woman.texi: * doc/misc/wisent.texi: * doc/misc/widget.texi: * doc/misc/vtable.texi: * doc/misc/viper.texi: * doc/misc/vhdl-mode.texi: * doc/misc/use-package.texi: * doc/misc/url.texi: * doc/misc/tramp.texi: * doc/misc/todo-mode.texi: * doc/misc/srecode.texi: * doc/misc/speedbar.texi: * doc/misc/smtpmail.texi: * doc/misc/sieve.texi: * doc/misc/ses.texi: * doc/misc/semantic.texi: * doc/misc/sc.texi: * doc/misc/sasl.texi: * doc/misc/remember.texi: * doc/misc/reftex.texi: * doc/misc/rcirc.texi: * doc/misc/pgg.texi: * doc/misc/pcl-cvs.texi: * doc/misc/octave-mode.texi: * doc/misc/nxml-mode.texi: * doc/misc/newsticker.texi: * doc/misc/mh-e.texi: * doc/misc/message.texi: * doc/misc/mairix-el.texi: * doc/misc/info.texi: * doc/misc/ido.texi: * doc/misc/idlwave.texi: * doc/misc/htmlfontify.texi: * doc/misc/gnus.texi: * doc/misc/forms.texi: * doc/misc/flymake.texi: * doc/misc/eww.texi: * doc/misc/eudc.texi: * doc/misc/eshell.texi: * doc/misc/ert.texi: * doc/misc/erc.texi: * doc/misc/epa.texi: * doc/misc/emacs-gnutls.texi: * doc/misc/eieio.texi: * doc/misc/eglot.texi: * doc/misc/efaq-w32.texi: * doc/misc/efaq.texi: * doc/misc/edt.texi: * doc/misc/ediff.texi: * doc/misc/ede.texi: * doc/misc/ebrowse.texi: * doc/misc/dired-x.texi: * doc/misc/dbus.texi: * doc/misc/cl.texi: * doc/misc/cc-mode.texi: * doc/misc/calc.texi: * doc/misc/bovine.texi: * doc/misc/autotype.texi: * doc/misc/auth.texi: * doc/lispintro/emacs-lisp-intro.texi: * doc/lispref/elisp.texi: * doc/emacs/emacs.texi: Add @documentlanguage where it was missing. This makes the language explicit given the change in behavior expected in Texinfo 7.3.
* ; * doc/lispref/edebug.texi (Using Edebug): Fix a typo (bug#80459).Eli Zaretskii2026-02-211-1/+1
|
* Restore 'cond' one element clauses to 'cond*'Sean Whitton2026-02-191-2/+3
| | | | | | | | | | * lisp/emacs-lisp/cond-star.el (cond*-non-exit-clause-p) (cond*-non-exit-clause-substance): Treat only one element clauses beginning with match*/pcase* pseudoforms as non-exit. (cond*-convert-condition): Handle exiting clauses with only one element, that is a regular Lisp expression. (cond*): * doc/lispref/control.texi (cond* Macro): Document the change.
* Add frame-use-time, get-mru-frame, use mru frame in delete-frame (bug#80397)Stéphane Marks2026-02-181-0/+49
| | | | | | | | | | * lisp/frame.el (get-mru-frame): New defun. * src/frame.c (delete_frame): Call 'get-mru-frame' (when force is not Qnoelisp) to select the most recently used frame that is not the deleted frame as the candidate to select. (syms_of_frame): Qget_mru_frame new DEFSYM. * doc/lispref/frames.texi: Document the new functions. * etc/NEWS: Announce the new functions.
* * doc/lispref/commands.texi (Special Events): Fix insert-special-event defun.Michael Albinus2026-02-161-7/+7
|
* ; Mention when make_unibyte_string was introduced.Basil L. Contovounesios2026-02-141-3/+4
|
* ; Fix define-obsolete-face-alias entry in manual.Basil L. Contovounesios2026-02-141-3/+3
|
* ; Improve documentation of EdebugEli Zaretskii2026-02-141-4/+13
| | | | | | * doc/lispref/edebug.texi (Edebug, Using Edebug, Instrumenting) (Source Breakpoints, Specification List): Improve indexing and tell how to end debugging.
* Adjust documentation to changes in 'overlays-in' and 'overlays-at'Eli Zaretskii2026-02-141-16/+36
| | | | | | | | | | | | * src/buffer.c (overlays_in): Fix commentary to match the code. (Foverlays_in, Foverlays_at): Doc fixes. (Bug#80242) * test/src/buffer-tests.el (test-overlays-at-2): Add one test. * doc/lispref/display.texi (Finding Overlays): Update and improve the documentation of 'overlays-in' and 'overlays-at'. * etc/NEWS: Announce the changes.
* Fix typo in smie-rules-function documentationMorgan Willcock2026-02-111-1/+1
| | | | | | | | | | Fix a typo in the documentation for the expected arguments when calling smie-rules-function to set the indentation offset of function arguments. * doc/lispref/modes.texi (SMIE Indentation): * lisp/emacs-lisp/smie.el (smie-rules-function): Fix typo in documentation for smie-rules-function arguments.
* cond*: bind-and* is not always a non-exit clause!Sean Whitton2026-02-111-11/+11
| | | | | | | | * lisp/emacs-lisp/cond-star.el (cond*-non-exit-clause-p) (cond*-non-exit-clause-substance): Don't consider a bind-and* clause without ':non-exit' to be a non-exit clause (bug#80376). (cond*): * doc/lispref/control.texi (cond* Macro): Fix docs accordingly.
* ; system-sleep texi markup fix (bug#80348)Stéphane Marks2026-02-111-5/+5
| | | | * doc/lispref/os.texi (System Sleep): Minor markup fixes.
* ; Fix recently installed changesEli Zaretskii2026-02-111-6/+8
| | | | | | | | | | | | | | * src/w32fns.c (w32_register_for_sleep_notifications) (sleep_notification_callback): Fix signatures. * src/w32term.h (w32_register_for_sleep_notifications): Fix prototype. These changes avoid compilation warnings. * lisp/system-sleep.el: Remove stray non-ASCII character. * doc/lispref/os.texi (System Sleep): Remove non-ASCII character, and fix wording and markup. * etc/NEWS: Fix wording of recently-added entry.
* system-sleep sleep blocker and sleep/wake event package (bug#80348)Stéphane Marks2026-02-112-5/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This package provides platform-neutral interfaces to block your system from entering idle sleep and a hook to process pre-sleep and post-wake events. Implementations are for D-Bus on GNU/Linux, macOS/GNUstep, and MS-Windows. * lisp/system-sleep.el: New package. * src/fns.c: Qpre_sleep, Qpost_wake: New DEFSYM. * src/nsfns.m (Fns_block_system_sleep, Fns_unblock_system_sleep) (syms_of_nsfns): New functions. * src/nsterm.m (applicationDidFinishLaunching): Subscribe to pre-sleep and post-wake notifications. (systemWillSleep, systemDidWake): New function. * src/w32fns.c (Fw32_block_system_sleep) (Fw32_unblock_system_sleep, Fw32_system_sleep_block_count) (sleep_notification_callback) (w32_register_for_sleep_notifications): New function. (syms_of_w32fns): Sw32_unblock_system_sleep Sw32_block_system_sleep Sw32_system_sleep_block_count: New defsubr. * src/w32term.h (Fw32_block_system_sleep): New extern. * src/w32term.c (w32_initialize): Call w32_register_for_sleep_notifications. * doc/lispref/os.texi: Document the system-sleep package. * doc/lispref/commands.texi: Update sleep-event special documentation. * etc/NEWS: Announce the new package.
* ; * doc/lispref/os.texi (Timers): Fix typo.Michael Albinus2026-02-091-1/+1
|
* ; Further fixes to core documentation for cond*.Sean Whitton2026-02-081-1/+1
|
* ; Fix some issues in core documentation for cond*.Sean Whitton2026-02-081-24/+27
|
* ; * doc/lispref/commands.texi (Special Events): Add cross-reference.Eli Zaretskii2026-02-081-1/+2
|
* ; 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)
* ; Improve indexing in the ELisp manualEli Zaretskii2026-02-022-0/+4
| | | | | | * doc/lispref/functions.texi (Function Names): * doc/lispref/variables.texi (Tips for Defining): Improve indexing.
* Improve documentation of 'seq-difference'Jens Schmidt2026-01-311-4/+5
| | | | | | * doc/lispref/sequences.texi (Sequence Functions): * lisp/emacs-lisp/seq.el (seq-difference): Clarify the documentation of 'seq-difference'. (Bug#80257)
* Improve connection-local variables documentation.Michael Albinus2026-01-311-0/+13
| | | | | | * doc/emacs/custom.texi (Connection Variables): * doc/lispref/variables.texi (Applying Connection Local Variables): Improve documentation.
* ; Fix documentaion of 'seq-intersection'Jens Schmidt2026-01-311-3/+3
| | | | | | * doc/lispref/sequences.texi (Sequence Functions): * lisp/emacs-lisp/seq.el (seq-intersection): Fix documentaion of 'seq-intersection'. (Bug#80257)
* ; Improve documentation of 'condition-case-unless-debug'Eli Zaretskii2026-01-311-1/+3
| | | | | | * doc/lispref/control.texi (Handling Errors): * lisp/subr.el (condition-case-unless-debug): Improve the documentation of 'condition-case-unless-debug'. (Bug#80234)
* New function 'truncate-string-pixelwise' (bug#80244)Stéphane Marks2026-01-311-0/+34
| | | | | | | | | | | | | | | 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.
* ; Fix last changeEli Zaretskii2026-01-291-10/+25
| | | | | | | * etc/NEWS: * doc/lispref/windows.texi (Choosing Window Options): * doc/emacs/windows.texi (Window Choice): Improve documentation of 'split-window-preferred-direction'.
* Document frame id related commands and tweak a return value (Bug#80192)Stéphane Marks2026-01-271-0/+24
| | | | | | | | * doc/lispref/frames.texi (Input Focus): Document the commands 'select-frame-by-id' and 'undelete-frame-by-id'. * lisp/frame.el (select-frame-by-id): Clarify return value and add missing optional argument 'noerror' in sympathy with 'undelete-frame-by-id'.
* Improve animation cache documentationBasil L. Contovounesios2026-01-241-1/+11
| | | | | | | | | | | | | | | | | | * doc/lispref/display.texi (Image Cache): Document animation cache argument that clear-image-cache gained in Emacs 29 (bug#56546, bug#66221). * lisp/image.el (image-animate-timeout): Note limitation of clear-image-cache with ImageMagick. * src/image.c (Fclear_image_cache): Rename animation-cache argument to animation-filter and expand its description for clarity. (struct anim_cache, anim_create_cache, image_prune_animation_caches): Improve commentary. (mark_image_cache): Replace stale commentary that referred to forall_images_in_image_cache with description of mark_image_cache. [HAVE_IMAGEMAGICK] (struct animation_cache): Mention lack of clear-image-cache support in commentary.
* Support cons cell for 'line-spacing'Daniel Mendler2026-01-241-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * etc/NEWS: Announce the change. * src/dispextern.h (struct glyph_row): Add 'extra_line_spacing_above' member. (struct it): Add 'extra_line_spacing_above' member. * src/frame.h (struct frame): Add 'extra_line_spacing_above' member. Update comment for 'extra_line_spacing.' * src/buffer.c (syms_of_buffer): Update the docstring of 'line-spacing' to describe the cons cell usage. * src/buffer.h (struct buffer): Update comment for 'extra_line_spacing'. * src/frame.c (gui_set_line_spacing): Handle cons cell value for 'line-spacing'. Calculate and set 'extra_line_spacing_above' for both integer and float pairs. * src/xdisp.c (init_iterator): Initialize 'extra_line_spacing_above' from buffer or frame 'line-spacing', handling cons cells for both integer and float values. (gui_produce_glyphs): Use 'extra_line_spacing_above' to distribute spacing between ascent and descent. Update 'max_extra_line_spacing' calculation. (resize_mini_window): Take line spacing into account when resizing the mini window. Pass height of a single line to 'grow_mini_window' and 'shrink_mini_window'. * src/window.c (grow_mini_window, shrink_mini_window): Add unit argument which defines height of a single line. * src/window.h (grow_mini_window, shrink_mini_window): Adjust function prototypes accordingly with unit argument. * lisp/subr.el (total-line-spacing): New function to calculate total spacing from a number or cons cell. (posn-col-row): Use total-line-spacing. * lisp/simple.el (default-line-height): Use 'total-line-spacing'. * lisp/textmodes/picture.el (picture-mouse-set-point): Use 'total-line-spacing'. * lisp/window.el (window-default-line-height): Use 'total-line-spacing'. (window--resize-mini-window): Take 'line-spacing' into account. * test/lisp/subr-tests.el (total-line-spacing): New test. * test/src/buffer-tests.el (test-line-spacing): New test. * doc/emacs/display.texi (Display Custom): Document that 'line-spacing' can be a cons cell. (Line Height): Document the new cons cell format for 'line-spacing' to allow vertical centering. Co-authored-by: Przemysław Alexander Kamiński <alexander@kaminski.se> Co-authored-by: Daniel Mendler <mail@daniel-mendler.de>
* Jsonrpc: don't let remote endpoint requests go unansweredJoão Távora2026-01-211-6/+15
| | | | | | | | | | | | Previously, 'quit' could cause remote endpoints to never get a reply and thus sometimes hang. Ensure we always reply. Also, give the application a chance to signal jsonrpc-error with the served code=32000, meaning "no error". * doc/lispref/text.texi (JSONRPC Overview): Rework section on request dispatchers. * lisp/jsonrpc.el (jsonrpc-connection-receive): Rework.
* ; * doc/lispref/internals.texi (Garbage Collection): typoMattias Engdegård2026-01-211-1/+1
|
* (garbage-collect-heapsize): New functionStefan Monnier2026-01-201-8/+14
| | | | | | | | | | | | | | | | | The info returned from `garbage-collect` is really handy to track the evolution of the heap size, but sadly it's available only at the cost of running a full GC, which has two big downsides: it's slow, it affects what we're measuring, and it can't be used in `post-gc-hook`. So, this patch makes it available without running the GC. * src/alloc.c (Fgarbage_collect_heapsize): New function, extracted from `Fgarbage_collect`. (Fgarbage_collect): Use it. (syms_of_alloc): defsubr it. * doc/lispref/internals.texi (Garbage Collection): Extract documentation for it from that of `garbage-collect`.