summaryrefslogtreecommitdiff
path: root/lisp/simple.el
AgeCommit message (Collapse)Author
2026-05-17; Improve documentation of commands that move by compilation errorsEli Zaretskii
* lisp/simple.el (next-error): * lisp/progmodes/compile.el (compilation-next-error) (compilation-previous-error): Doc fixes.
2026-04-30Fix value of 'default-line-height'Eli Zaretskii
* lisp/simple.el (default-line-height): Fix use of buffer-local value of 'line-spacing'. (Bug#80929)
2026-04-25(Info-documentlanguage): Keep Info-related code in `info.el`Stefan Monnier
* lisp/simple.el (Info-documentlanguage): Move from here... * lisp/info.el (Info-documentlanguage): ...to here.
2026-04-25; * lisp/simple.el (Info-documentlanguage): Add a local safe variable.Eli Zaretskii
2026-04-21Fix 'toggle-truncate-lines' when 'visual-line-mode' is ONEli Zaretskii
* lisp/simple.el (toggle-truncate-lines): Force 'truncate-lines' non-nil, even if visual-line-mode needs to be turned off. (Bug#80741)
2026-03-17Further improve blink-matching-paren-highlight-offscreenTassilo Horn
* lisp/simple.el (blink-matching-paren-offscreen): Inherit from show-paren-match face. (blink-paren-open-paren-line-string): Add blink-matching-paren-offscreen face properties to opening paren instead of replacing original fontification. * lisp/paren.el (show-paren-context-when-offscreen): Mention blink-matching-paren-highlight-offscreen in docstring.
2026-03-15Merge remote-tracking branch 'origin/scratch/error-API'Stefan Monnier
2026-03-12Don't strip face properties in blink-paren-open-paren-line-stringTassilo Horn
With bug#59527 we ensured that the open paren line string was fontified which was broken again with bug#63089 because there, the opening paren was fontified with a new face. With this change, the returned string is fontified again. Only if `blink-matching-paren-highlight-offscreen' is non-nil, the opening paren is unfontified and then fontified again with the `blink-matching-paren-offscreen' face. * lisp/simple.el (blink-paren-open-paren-line-string): Keep returned line string fontified with slight exception if `blink-matching-paren-highlight-offscreen' is non-nil.
2026-03-10Use the new error API functionsStefan Monnier
* lisp/epa-file.el (epa-file--find-file-not-found-function): Use `error-slot-value` and `error-data`. (epa-file-insert-file-contents): Use `error-has-type-p`, `error-slot-value`, and `error-data`. * lisp/jka-compr.el (jka-compr-insert-file-contents): Use `error-has-type-p` and `error-slot-value` as well as new re-signaling form of `signal`. * lisp/simple.el (minibuffer-error-function): Use `error-has-type-p`. * lisp/startup.el (startup--load-user-init-file): Use `error-message-string`. (command-line): Use `error-has-type-p` and `error-message-string`. * lisp/type-break.el (type-break-demo-life): Use `error-message-string`. * lisp/emacs-lisp/bytecomp.el (batch-byte-compile-file): Use `error-message-string` and `error-has-type-p`. * lisp/emacs-lisp/edebug.el (edebug-safe-eval, edebug-report-error) (edebug-eval-expression): * lisp/emacs-lisp/debug.el (debugger-eval-expression): Use `error-message-string`. * lisp/emacs-lisp/ert.el (ert--should-error-handle-error): Use `error-has-type-p` and `error-type`. * lisp/net/sasl.el (sasl-error): Use `define-error`. * lisp/net/tramp-compat.el (tramp-error-type-p): New function. (tramp-permission-denied, tramp-compat-permission-denied): Use it. * lisp/progmodes/elisp-mode.el (elisp-completion-at-point): Use `error-type-p`. * lisp/xt-mouse.el (turn-on-xterm-mouse-tracking-on-terminal) (turn-off-xterm-mouse-tracking-on-terminal): Use `error-slot-value`. * lisp/simple.el (next-line, previous-line): Remove useless `condition-case` handler, and hence the whole `condition-case`, and then simplify. * lisp/gnus/nnrss.el (nnrss-insert): Use `with-demoted-errors`. * lisp/gnus/nnmaildir.el (nnmaildir--emlink-p, nnmaildir--enoent-p) (nnmaildir--eexist-p): Use `error-has-type-p`. (nnmaildir--new-number, nnmaildir-request-set-mark): Use single-arg `signal`. * lisp/ffap.el (ffap-machine-p): Use `error-slot-value`. * lisp/emacs-lisp/comp.el (comp--native-compile): Use `error-has-type-p` as well as single-arg `signal`. * lisp/net/ange-ftp.el (ange-ftp-hook-function): Use single-arg `signal`. * lisp/ebuff-menu.el (electric-buffer-menu-looper): Use `error-has-type-p`. * lisp/progmodes/ebrowse.el (ebrowse-electric-list-looper): Use `error-has-type-p`. (ebrowse-electric-position-looper): Make it an alias of `ebrowse-electric-list-looper`. * lisp/ibuffer.el (ibuffer-confirm-operation-on): * lisp/ls-lisp.el (ls-lisp--insert-directory): * lisp/gnus/gnus-search.el (gnus-search-run-query): * lisp/mail/mail-extr.el (mail-extr-safe-move-sexp): * lisp/net/dbus.el (dbus-set-property): * lisp/net/eudc-export.el (eudc-bbdbify-phone): * lisp/net/imap.el (imap-fetch-safe): * lisp/vc/vc.el (vc-root-dir): Use `error-slot-value` and single-arg `signal` to re-signal.
2026-03-10Error handling clarifications found during error-APIStefan Monnier
* lisp/simple.el (next-line, previous-line): Remove useless `condition-case` handler, and hence the whole `condition-case`, and then simplify. * lisp/emacs-lisp/comp.el (comp--error-add-context): New function. (comp--native-compile): Use it. * lisp/gnus/nnrss.el (nnrss-insert): Use `with-demoted-errors`.
2026-03-05; Move unfill-paragraph to fill.el. Document it in (elisp)Filling.Sean Whitton
2026-03-04New command 'unfill-paragraph'Sean Whitton
* lisp/simple.el (unfill-paragraph): New command. * doc/emacs/indent.texi (Indentation Commands): * etc/NEWS: Document it.
2026-01-24Support cons cell for 'line-spacing'Daniel Mendler
* 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>
2026-01-22lisp/simple.el (goto-line): Minor optimizationStefan Monnier
2026-01-22Restrict the 'buffer' arg of 'goto-line' only to interactive usesJuri Linkov
* lisp/simple.el (goto-line): Use 'buffer' arg only when 'interactive' is non-nil (bug#80150). Update docstring.
2026-01-19Allow non-interactive calls of 'goto-line' (bug#80150)Juri Linkov
* lisp/simple.el (goto-line, goto-line-relative): Add new arg 'interactive'. Remove 'declare' with 'interactive-only'. Don't push the mark when called non-interactively.
2026-01-14Add new up-down option for minibuffer-visible-completionsSpencer Baugh
* lisp/emacs-lisp/crm.el (completing-read-multiple): Call 'minibuffer-visible-completions--maybe-compose-map'. * lisp/minibuffer.el (completion-in-region-mode): Call 'minibuffer-visible-completions--maybe-compose-map'. (minibuffer-visible-completions): Add new value 'up-down' (bug#80024). (minibuffer-visible-completions-up-down-map): Add. (minibuffer-visible-completions--maybe-compose-map): Add helper function. (completing-read-default): Call 'minibuffer-visible-completions--maybe-compose-map'. * lisp/simple.el (completion-setup-function): Check 'minibuffer-visible-completions' is t, not just non-nil.
2026-01-01; Add 2026 to copyright years.Sean Whitton
2025-12-31Factor out undo-ignore-read-only (bug#80049)Sean Whitton
* lisp/vc/diff-mode.el (diff-undo): Rename to undo-ignore-read-only. (diff-mode-shared-map): Update "<remap> <undo>" binding. * lisp/simple.el (undo-ignore-read-only): Rename from diff-undo. * lisp/dired.el (dired-undo): * lisp/proced.el (proced-undo): Call it. New numeric prefix argument to specify a repeat count. * doc/emacs/dired.texi (Marks vs Flags): * etc/NEWS: Document the change.
2025-12-26December 2025 spelling fixesPaul Eggert
Some of the fixes are to continue to use American rather than British spelling. * doc/misc/modus-themes.org (my-modus-themes-engraved-faces): Fix misspelled ‘:foreground’s. * etc/themes/modus-themes.el (modus-themes-faces): Fix misspelled ‘modus-themes-bold’. * lisp/emacs-lisp/rx.el (rx--normalize-char-pattern): Rename from rx--normalise-char-pattern. (rx--optimize-or-args): Rename from rx--optimise-or-args. * lisp/frame.el (frame--special-parameters): Fix misspelled "right-divider-width". * lisp/net/tramp.el (tramp-fingerprint-prompt-regexp): Use American spelling “centered”, to match current libfprintf. * lisp/org/org-fold-core.el (org-fold-core--optimize-for-huge-buffers): Rename from org-fold-core--optimise-for-huge-buffers. (org-fold-core-update-optimization): Rename from org-fold-core-update-optimisation, leaving an alias behind. (org-fold-core-remove-optimization): Rename from org-fold-core-remove-optimisation, leaving an alias behind. * lisp/org/org.el (org-advertized-archive-subtree): This alias is now obsolete. * lisp/play/zone.el (zone-ignored-buffers): Fix misspelling of ‘zone--buffer-encrypted-p’. * lisp/progmodes/csharp-mode.el (csharp-ts-mode-faces): Fix misspelling of ‘csharp’ group. * lisp/vc/vc.el (vc-clonable-backends-custom-type): Rename from vc-cloneable-backends-custom-type, leaving an alias behind. * test/lisp/emacs-lisp/bytecomp-tests.el: (bytecomp-tests--warn-arity-non-compiled-callee): Rename from bytecomp-tests--warn-arity-noncompiled-callee. (bytecomp-test-defface-spec): Reword a deliberate misspelling of “default” that is so common I don’t want it to pollute the spelling dictionary. * test/lisp/emacs-lisp/package-vc-tests.el: (package-vc-tests-preserve-artifacts): Rename from package-vc-tests-preserve-artifacts. * test/lisp/eshell/em-prompt-tests.el: (em-prompt-test/forward-backward-paragraph-1): Reword a deliberate misspelling of “goodbye” that is so common I don’t want it to pollute the spelling dictionary.
2025-12-15; * lisp/simple.el (kill-visual-line): Fix a thinko in last change.Eli Zaretskii
2025-12-14Fix a bug in 'kill-visual-line' that caused it signal an errorEli Zaretskii
* lisp/simple.el (kill-visual-line): Don't assume 'posn-at-point' always returns a non-nil value. (Bug#80004)
2025-12-08New 'R' code letter for 'interactive' formsSean Whitton
* src/callint.c (callint_argfuns): Add use-region-beginning and use-region-end. (syms_of_callint): Protect use-region-beginning and use-region-end. Add DEFSYM for Quse_region_p. (Fcall_interactively): New 'R' code letter. * lisp/textmodes/paragraphs.el (repunctuate-sentences): * lisp/vc/diff-mode.el (diff-delete-other-hunks, diff-apply-hunk) (diff-revert-and-kill-hunk, diff-apply-buffer): * lisp/vc/log-view.el (log-view-mark-entry) (log-view-unmark-entry): Use it. * doc/lispref/commands.texi (Interactive Codes): * doc/lispref/markers.texi (The Region): * etc/NEWS: * lisp/simple.el (use-region-beginning, use-region-end) (use-region-p): * src/callint.c (Finteractive): Document it.
2025-11-11; minibuffer-default-add-shell-commands: Use 'and' not 'unless'.Sean Whitton
2025-11-09* lisp/simple.el (minibuffer-default-add-shell-commands): Fix old bug.Juri Linkov
Don't treat the first element of the list of commands as a file name.
2025-11-02* lisp/simple.el (previous-line-or-history-element): Fix off-by-one error.Juri Linkov
(bug#79746)
2025-10-18Merge from origin/emacs-30Eli Zaretskii
53aac6aecd2 ; Improve documentation of commands that split current wi...
2025-10-18; Improve documentation of commands that split current windowEli Zaretskii
* doc/emacs/sending.texi (Sending Mail): * doc/emacs/dired.texi (Dired Enter, Dired Visiting): * doc/emacs/maintaining.texi (Old Revisions) (Change Log Commands, Looking Up Identifiers): * doc/emacs/windows.texi (Displaying Buffers): * doc/emacs/files.texi (Visiting): Add cross-references to where user options are described which control how windows are split. * lisp/mail/sendmail.el (mail-other-window): * lisp/gnus/message.el (message-mail-other-window) (message-news-other-window): * lisp/replace.el (occur-mode-goto-occurrence-other-window): * lisp/vc/vc.el (vc-revision-other-window): * lisp/vc/vc-dir.el (vc-dir-find-file-other-window): * lisp/progmodes/xref.el (xref-find-definitions-other-window): * lisp/simple.el (compose-mail-other-window) (clone-indirect-buffer-other-window): * lisp/vc/add-log.el (add-change-log-entry-other-window): * lisp/view.el (view-file-other-window) (view-buffer-other-window): * lisp/window.el (switch-to-buffer-other-window): * lisp/files.el (find-file-other-window) (find-file-read-only-other-window) (find-alternate-file-other-window): * lisp/dired.el (dired-other-window) (dired-mouse-find-file-other-window) (dired-find-file-other-window, dired-jump-other-window): Mention in the doc strings how to control the way the current window is split.
2025-10-14(define-minor-mode): Update `global-minor-modes` if init-value is non-nilStefan Monnier
When a global minor mode is enabled by init-value rather than by calling the major mode function, we failed to register it in `global-minor-modes` (bug#79518). * lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Register ourselves in `global-minor-modes` at top-level for global modes with a non-nil init-value. Also in the `modefun`, simply the code with `not` and `add-to-list` and consolidate the local/global paths to update `*-minor-modes`. * lisp/simple.el (global-minor-modes): Move to... * lisp/subr.el (global-minor-modes): ...here so it's defined early enough for `auto-compression-mode` to register itself.
2025-10-11Do not erase the output buffer upon empty async shell commandManuel Giraud
* lisp/simple.el (shell-command): Test if an asynchronous shell command is not empty before creating or erasing the output buffer. (Bug#79560)
2025-09-29Fix completions truncated on scrolling (bug#79506)Juri Linkov
* lisp/simple.el (completion-setup-function): Add 'completion--lazy-insert-strings-on-scroll' to buffer-local hook 'window-scroll-functions'. * lisp/minibuffer.el (completion--lazy-insert-strings-on-scroll): New function. (completion--in-region-1): Remove calls to the function 'completion--lazy-insert-strings' that now are handled by the scroll hook.
2025-09-22Navigate *Completions* buffer based on 'completions-format'Stephen Berman
This patch makes 'next-completion' and 'previous-completion' work in the vertical completions format analogously to how they work in the default horizontal format (bug#78959). It also fixes wrapping in the vertical format and confines navigation (including wrapping) in column-wise movement in the vertical format to the current line, analogously to how navigation (including wrapping) in line-wise movement in the horizontal format is confined to the current column. * doc/emacs/mini.texi (Completion): Fix several typos and improve wording is several places. (Completion Commands): Document navigation of the *Completions* buffer in the vertical format. Document the difference between format-sensitive movement and strictly column-wise or line-wise movement. Document 'minibuffer-complete-and-exit' and update the documentation of 'minibuffer-completion-auto-choose' and 'minibuffer-choose-completion'. Document the use of a numeric prefix argument with the navigation commands. (Completion Options): Rearrange and improve documentation of 'completions-sort', 'completions-format' and 'completion-auto-wrap', updating the latter to document the new behavior. * lisp/minibuffer.el (minibuffer-visible-completions-map): Rebind "<left>" to 'minibuffer-previous-column-completion' and "<right>" to 'minibuffer-next-column-completion'. (minibuffer-next-completion): Add check for whether completions format is vertical to decide whether to call 'next-line-completion' and replace calling 'next-completion' by 'next-column-completion'. (minibuffer-next-column-completion) (minibuffer-previous-column-completion): New commands. * lisp/simple.el (completion-list-mode-map): Rebind "<left>" to 'previous-column-completion' and "<right>" to 'next-column-completion'. (last-completion): Add handling for vertical completions format. (completion--move-to-candidate-end): Always move point to the position immediately after the last character of the completion candidate. This unifies the behavior, simplifies the implementation and facilitates implementing the improved navigation of the *Completions* buffer. (previous-column-completion, next-column-completion): New commands, replacing the previous definitions of 'previous-completion' and 'next-completion' to reflect their column-wise operation. Confine navigation (including wrapping) in vertical format to the current line. (previous-line-completion, next-line-completion): Implement line-wise navigation (including wrapping) through all completions in vertical format, not just those in the current column as in horiztonal format. Update doc strings. (next-completion, previous-completion): Redefine to call '{next,previous}-line-completion' when completions format is vertical and '{next,previous}-column-completion' otherwise. * test/lisp/minibuffer-tests.el (completions-format-navigation--tests): New function providing a template to define tests of the navigation and wrapping behavior with specified numbers of completion candidates. (completions-format-navigation-test-{2,3,4,5,10,15,16}): New tests.
2025-08-27Make RET choose the selected completionSpencer Baugh
Previously, one could select a completion via M-<up>/M-<down>, but then RET would not actually select the chosen completion. With the addition of completion-auto-deselect, this is not actually necessary: we can reasonably assume that when a completion is selected, the user wants to use that, since their last action must have been to select it. So, just choose the selected completion on RET. This lets us default minibuffer-completion-auto-choose to nil. For minibuffers with require-match completion, this can be done by changing the existing command bound to RET. For minibuffers with nil require-match completion, RET was previously bound to exit-minibuffer, and changing exit-minibuffer to have this logic is risky. We handle that case by adding a new minibuffer-completion-exit which wraps exit-minibuffer and bind RET to it. * lisp/minibuffer.el (minibuffer-insert-completion-if-selected) (minibuffer-completion-exit, completion--selected-candidate): Add. (minibuffer-complete-and-exit): Call minibuffer-choose-completion. (bug#77253) (minibuffer-local-completion-map): Bind RET to minibuffer-completion-exit, overriding exit-minibuffer. (completion-in-region-mode-map): Bind RET to minibuffer-choose-completion when there's a selected candidate. (minibuffer-completion-auto-choose): Default to nil. (minibuffer-visible-completions--filter) (minibuffer-visible-completions-map): Delete RET binding, no longer necessary. * lisp/simple.el (completion-setup-function): Update completion help text to show more correct bindings. * test/lisp/minibuffer-tests.el (completions-header-format-test) (minibuffer-next-completion): Set minibuffer-completion-auto-choose=t explicitly. (with-minibuffer-setup, minibuffer-completion-RET-prefix) (completion-in-region-next-completion): Add new tests. * etc/NEWS: Announce.
2025-08-21Add minibuffer--completions-visible and use itSpencer Baugh
At various places, instead of just checking that there's any window displaying a buffer named *Completions*, we should additionally check that that *Completions* buffer is actually for the current completion session. minibuffer--completions-visible does that. * lisp/comint.el (comint-complete-input-ring) (comint-dynamic-list-completions): Call minibuffer--completions-visible. * lisp/minibuffer.el (minibuffer--completions-visible): Add. (bug#77253) (completion--do-completion, completions--post-command-update) (completions--after-change, minibuffer-hide-completions) (minibuffer-visible-completions) (minibuffer-visible-completions--always-bind) (minibuffer-visible-completions--filter) (with-minibuffer-completions-window, minibuffer-complete-history) (minibuffer-complete-defaults): Call minibuffer--completions-visible. * lisp/pcomplete.el (pcomplete-show-completions): Call minibuffer--completions-visible. * lisp/simple.el (switch-to-completions): Call minibuffer--completions-visible. * test/lisp/minibuffer-tests.el (completion-auto-help-test) (completion-auto-select-test): Call minibuffer--completions-visible.
2025-07-21; * lisp/simple.el (shell-command): Fix last change (bug#79067).Eli Zaretskii
2025-07-20Improve error message for "C-u M-! something &"Eli Zaretskii
* lisp/simple.el (shell-command): User-friendlier error message when async shell command is invoked with a prefix argument.
2025-07-12New command 'mode-line-invisible-mode'Elías Gabriel Pérez
This new command allows hide the mode line in the current buffer. (Bug#78881) * doc/emacs/display.texi (Optional Mode Line): Document feature. * etc/NEWS: Announce changes. * lisp/simple.el (mode-line-invisible--buf-state): New buffer local variable. (mode-line-invisible-mode): New minor mode.
2025-05-31Add additional keybindings for flymake diagnostics modesMatthew Tromp
This adds keybindings for C-o and C-m, and changes the bindings for n and m, in `flymake-diagnostics-buffer-mode' and `flymake-project-diagnostics-mode' buffers. Previously, `flymake-project-diagnostics-mode' did not use the keybindings for `flymake-diagnostics-buffer-mode'. RET and SPC were never bound in `flymake-project-diagnostics-mode' buffers. This seems to have been an oversight: since the filename and message are buttons which call `flymake-goto-diagnostic', pressing RET still brought users to the diagnostic at point most of the time. This change adds a `flymake-project-diagnostics-mode-map' which inherits from `flymake-diagnostics-buffer-mode-map'. C-o and C-m now show and jump to the diagnostic currently at point, similar to how `compilation-mode' works. n and p now show the diagnostic newly under point after moving up or down a line, which is also intended to make behavior more similar to `compilation-mode'. In order that other next-error buffers do not interfere with navigation in the diagnostics buffers, this change introduces and uses new functions, `next-error-this-buffer-no-select' and `previous-error-this-buffer-no-select'. If we instead used `next-error-no-select' and `previous-error-no-select', then a user who runs `flymake-show-diagnostics-buffer', then e.g. `compile', then returns to the diagnostics buffer and presses 'n', would be navigated to the next error in the compilation buffer. * lisp/progmodes/flymake.el (flymake-diagnostics-buffer-mode-map): Add bindings. (flymake-project-diagnostics-mode-map): Inherit bindings from `flymake-diagnostics-buffer-mode' * lisp/simple.el (next-error-this-buffer-no-select): (previous-error-this-buffer-no-select): Add new commands. (Bug#78619) Copyright-paperwork-exempt: yes
2025-05-12simple.el (delete-trailing-whitespace-mode): New minor mode (bug#78264)Stefan Monnier
Partly motivated by bug#78097. * lisp/simple.el (delete-trailing-whitespace-if-possible): New function. (delete-trailing-whitespace-mode): New minor mode. * lisp/editorconfig.el (editorconfig-trim-whitespaces-mode): Change default to `delete-trailing-whitespace-mode`. (editorconfig--get-trailing-ws): Simplify accordingly. (editorconfig--add-hook-safe-p): Delete function. Don't touch `safe-local-eval-function` any more.
2025-04-26Avoid signaling errors in 'cursor-face-highlight-mode'Eli Zaretskii
* lisp/simple.el (redisplay--update-cursor-face-highlight): Don't go beyond the accessible portion of the buffer. (Bug#77747)
2025-04-13Fix 'backward-delete-char-untabify'Asher Copeland
* lisp/simple.el (backward-delete-char-untabify): Fix behavior when there's an active region. (Bug#75042) Copyright-paperwork-exempt: yes
2025-03-27Handle better changed default-directory in shell-commandMichael Albinus
* lisp/simple.el (shell-command): Kill buffer-local values of `shell-file-name' and `shell-command-switch', there could be left connection-local values. (Bug#76888)
2025-03-21Lazily highlight and insert candidates in *Completions*Spencer Baugh
From profiling, the main bottleneck in completion over large completion sets is display-completion-list, when there are many available candidates. For example, in my large monorepo, when completing over the 589196 files or the 73897 branches, even with the candidates narrowed down by typing some prefix to complete, TAB (when it shows *Completions*) or ? is slow, mostly in display-completion-list. However, rendering all the completion candidates is unnecessary if the *Completions* window is never scrolled to see those candiates. By eagerly inserting only some candidates and lazily highlighting and inserting the remaining candidates only when necessary, performance is much improved. * lisp/minibuffer.el (completion--insert-strings): Insert completions lazily. (bug#74561) (completions--lazy-insert-button): Add. (completion--insert-horizontal, completion--insert-one-column): Throw a continuation when enough lines of completions are inserted. (completion--insert-vertical): Add ignored lines argument. (minibuffer-completion-help): Set completion-lazy-hilit. (with-minibuffer-completions-window): Call completion--lazy-insert-strings. (with-minibuffer-completions-window): * lisp/simple.el (completion-setup-function): Preserve buffer-locals required for lazy completion insertion. (switch-to-completions): Call completion--lazy-insert-strings. * etc/NEWS: Announce.
2025-03-16Use defvar-keymap for some trivial keymapsStefan Kangas
* lisp/bindings.el (mode-line-window-dedicated-keymap) (mode-line-buffer-identification-keymap): * lisp/emulation/cua-rect.el (cua--overlay-keymap, cua--overlay-key): * lisp/mh-e/mh-mime.el (mh-mime-security-button-map): * lisp/mh-e/mh-utils.el (mh-hidden-header-keymap): * lisp/net/eudc-bob.el (eudc-bob-generic-keymap, eudc-bob-image-keymap) (eudc-bob-sound-keymap, eudc-bob-url-keymap, eudc-bob-mail-keymap): * lisp/progmodes/etags-regen.el (etags-regen-mode-map): * lisp/progmodes/octave.el (octave-help-mode-map): * lisp/replace.el (multi-query-replace-map): * lisp/simple.el (process-menu-mode-map, messages-buffer-mode-map): * lisp/startup.el (splash-screen-keymap): * lisp/tab-bar.el (tab-bar-mode-map): * lisp/textmodes/ispell.el (ispell-minor-keymap): * lisp/textmodes/tex-mode.el (latex-mode-map, plain-tex-mode-map): * lisp/tree-widget.el (tree-widget-button-keymap): * lisp/vc/vc-hooks.el (vc-mode-line-map): Use defvar-keymap.
2025-03-12; exchange-point-and-mark-highlight-region: Add more detail here tooSean Whitton
2025-03-12; Add more detail to exchange-point-and-mark docstringSean Whitton
It didn't mention that exchange-point-and-mark-highlight-region affects C-u C-x C-x too.
2025-03-12; Touch up docs for exchange-point-and-mark-highlight-regionSean Whitton
2025-03-12Merge from origin/emacs-30Sean Whitton
894b0e3a2fe ; Adapt comment in tramp.el cc87717fa07 Add keyword placeholder to tramp.el 7d0d61d8549 Rewrite ERT manual introduction b2f124f2a88 ; cperl-mode.el: Don't misinterpret exec_fcn as keyword exec 59d1aac49df Document return values of the various read-* functions
2025-03-12; Fix :version tagStefan Kangas
Reported by Campbell Barton <ideasman42@gmail.com>.
2025-03-11Remove variable aliases obsolete since Emacs 23.2Stefan Kangas
* lisp/dired.el (dired-advertised-find-file): * lisp/simple.el (advertised-undo): * lisp/wid-edit.el (advertised-widget-backward): Remove variable aliases obsolete since Emacs 23.2. They are replaced by ':advertised-binding' properties. * lisp/arc-mode.el (archive-mode-map): * lisp/dired.el (dired-mode-map): * lisp/obsolete/landmark.el (landmark-mode-map): * lisp/play/decipher.el (decipher-mode-map): * lisp/play/gomoku.el (gomoku-mode-map): * lisp/proced.el (proced-mode-map): Don't bind above removed commands.