Commit graph

81202 commits

Author SHA1 Message Date
Eli Zaretskii
beb54dc1b2 Improve documentation of 'file-preserve-symlinks-on-save'
* lisp/files.el (file-precious-flag): Mention
'file-preserve-symlinks-on-save' in the doc string.

* doc/lispref/files.texi (Saving Buffers): Move the description of
'file-preserve-symlinks-on-save' from here...
* doc/emacs/files.texi (Customize Save): ...to here.  Improve
wording.

* etc/NEWS: Fix wording of 'file-preserve-symlinks-on-save' entry.
2021-08-21 10:58:24 +03:00
Eli Zaretskii
742ae84a9c ; * lisp/progmodes/project.el: Fix punctuation in the commentary. 2021-08-21 10:10:28 +03:00
Dmitry Gutov
28170b7d48 Speed up project--read-project-buffer in remote buffers
* lisp/progmodes/project.el (project-buffers): New generic function.
(project--read-project-buffer): Use it here (bug#49264).
(project--buffers-to-kill): And here.
(project-buffers): Specialized implementation for vc-project.
2021-08-21 05:26:12 +03:00
Glenn Morris
222d033254 * lisp/bindings.el (page-navigation-repeat-map): Fix bootstrap. 2021-08-20 15:56:27 -07:00
Alan Mackenzie
13824c44d2 Fix c-tentative-buffer-changes to be nestable in c-save-buffer-state
* lisp/progmodes/cc-defs.el (c-tentative-buffer-changes)
(c-tnt-chng-record-state, c-tnt-chng-cleanup): Enhance such that a
buffer-undo-list of t is handled specially, so that a nil isn't consed onto
it.  Thus garbage collection can't later remove the (nil . t) from the end of
the buffer-undo-list, causing an infinite loop.
2021-08-20 21:12:37 +00:00
Davide Masserut
63cbb54d7e Mark page navigation commands as repeatable
* doc/emacs/basic.texi (Repeating): Document page navigation
repeatability.

* lisp/bindings.el (page-navigation-repeat-map): Add new map
(bug#50137).
* lisp/bindings.el (forward-page):
(backward-page): Mark as repeatable.

Copyright-paperwork-exempt: yes
2021-08-20 17:49:35 +02:00
Lars Ingebrigtsen
ac2cecbd83 Fix printing of C-@ in `describe-fontset'
* lisp/international/mule-diag.el (mule--kbd-at): New function
(bug#17836).
(print-fontset-element): Use it to get multi-key things correct.
2021-08-20 16:35:56 +02:00
Lars Ingebrigtsen
13fdded2c1 Allow preserving symlinks with file-precious-flag set
* doc/lispref/files.texi (Saving Buffers): Document it.
* lisp/files.el (file-preserve-symlinks-on-save): New user option
(bug#18125).
(basic-save-buffer-2): Use it.
2021-08-20 16:20:51 +02:00
Lars Ingebrigtsen
e1a209ef41 Fix infinite recursion in mode: tex
* lisp/textmodes/tex-mode.el (tex--redirect-to-submode): Inhibit
recursion when called from file-local variables (bug#50126).
2021-08-20 15:57:06 +02:00
Lars Ingebrigtsen
c2026cf366 Fix infinite recursion of conf-mode
* lisp/textmodes/conf-mode.el (conf-mode): Inhibit recursion when
called from file-local variables (bug#50126).
2021-08-20 15:55:24 +02:00
Marco Centurion
657fe8b9d8 Allow copy-directory to copy the source as a symlink
* doc/emacs/files.texi (Copying and Naming): Document it.

* lisp/files.el (copy-directory): Allow copying symbolic links as
is (bug#10897).
(copy-directory-create-symlink): New user option.

Copyright-paperwork-exempt: yes
2021-08-20 15:43:41 +02:00
Lars Ingebrigtsen
00a9c50ad7 Further tweaks to execute-extended-command
* lisp/simple.el (execute-extended-command): Move finding the
short command to the timer command, too (bug#50042).  This further
ensures that post-command-hook is run faster.
2021-08-20 15:07:24 +02:00
Lars Ingebrigtsen
969c3135d6 Remove even more waiting from execute-extended-command
* lisp/simple.el (execute-extended-command): Remove all the
waiting from the command and do it all with timers (bug#50042).
This ensures that post-command-hook is run immediately also when
the command has messaged something.
2021-08-20 14:55:40 +02:00
Mattias Engdegård
573e8eef86 ; * lisp/mouse.el: Fix typos in previous change 2021-08-20 13:51:36 +02:00
Mattias Engdegård
89c31342a7 Use C-mouse-1 for context menu on NS
The Mac platform convention is to use control-left-click for context
menus (as a synonym to right-click).

* lisp/mouse.el (context-menu--old-bindings): Remove.
(context-menu--saved-bindings)
(context-menu--bind-mouse, context-menu--reset-bindings): New.
(context-menu-mode): Use new functions, with C-mouse-1 as extra
binding on NS.
2021-08-20 12:34:34 +02:00
Mattias Engdegård
e1ed0c3af1 Fix xref {prev,next}-error target buffer match highlighting extent
* lisp/progmodes/xref.el (xref--next-error-function):
Bind `xref--current-item` during the call to `xref--show-location` so
that `xref-pulse-momentarily` finds the match extent.
2021-08-20 12:34:34 +02:00
Mattias Engdegård
c69b4768d6 Don't mutate string literal
* lisp/obsolete/terminal.el (terminal-escape-map): Rewrite loop in a
simpler and more robust way.
2021-08-20 12:34:34 +02:00
João Távora
fb81c8c3ad Make icomplete-forward-completions O(1) when icomplete-scroll is t
In particular, this makes the recently added
icomplete-vertical-goto-last (bug#49005) be O(n) instead of O(n^2).
That used to be almost unbearably slow for large n.

* lisp/icomplete.el (icomplete-forward-completions):  don't call last
unless needed.
2021-08-19 23:56:29 +01:00
Madhu
bfa3191c79 Correctly call completion-in-region in shell.el
* lisp/shell.el (shell-dynamic-complete-command)
(shell-dynamic-complete-environment-variable): Correctly call
completion-in-region (bug#50125).

Copyright-paperwork-exempt: yes
2021-08-19 18:02:07 +02:00
Basil L. Contovounesios
489ddc56ab ; Fix escaping in recent ibuf-ext.el doc change. 2021-08-19 16:58:58 +01:00
Lars Ingebrigtsen
9bf8bb0e3e Fix space at the start of appt mode line element
* lisp/calendar/appt.el (appt-check): Add space at the end
(bug#18164) -- all `global-mode-string' elements should have it
there to get an even space distribution.
2021-08-19 17:48:14 +02:00
Lars Ingebrigtsen
cd00fb5e2a Add ibuffer-saved-filter-groups example to the doc string
* lisp/ibuf-ext.el (ibuffer-saved-filter-groups): Add an example
for this complicated syntax (bug#18694).
2021-08-19 17:11:00 +02:00
Lars Ingebrigtsen
04f723dec9 Fix dired switch (that contain quotes and spaces) parsing
* lisp/files.el (insert-directory): Tokenize shell strings
correctly (bug#18875).
2021-08-19 16:21:07 +02:00
Lars Ingebrigtsen
a44432a773 Fix st.el doc string
* lisp/term/st.el (xterm-st-extra-capabilities): New user option
(bug#50119).
(terminal-init-st): Use it to avoid a two-second timeout.
2021-08-19 15:19:23 +02:00
Peter Münster
8bc6dbecd2 Add support for history of image tags and completion in the minibuffer
* lisp/image-dired.el (image-dired-tag-history): New variable holding the
tag history.
(image-dired-tag-files, image-dired-tag-thumbnail, image-dired-delete-tag)
(image-dired-tag-thumbnail-remove): Use it for the user input.
2021-08-19 15:03:23 +02:00
Peter Münster
63d6e1ffa1 Avoid problems when one tag/file is a substring of another
* lisp/image-dired.el (image-dired-remove-tag): End of filename is bound
by ";" and end of tag is bound by ";" or end of line.
2021-08-19 15:03:23 +02:00
Peter Münster
101b3c81b6 New placement of newline characters in image-dired-db-file
It's more usual to have the newline at the end of the line, instead of the
beginning. This change avoids missing newline at the end of the file, an
empty line at the start and eventually a lot of empty lines when
`require-final-newline' is not nil.

* lisp/image-dired.el (image-dired-write-tags): Insert newline at the end
of the line, instead of the beginning.
(image-dired-remove-tag): Do not delete empty line at end of buffer.
2021-08-19 15:03:23 +02:00
Peter Münster
bf64342a8f Fix deletion of associated image
* lisp/image-dired.el (image-dired-delete-marked): Treat original images
first, because point position is used when there are no marked files.
2021-08-19 15:03:23 +02:00
Eli Zaretskii
787fa7a8ab Minor doc fixes in icomplete.el
* lisp/icomplete.el (icomplete-section): Add :version.
(icomplete--augment): Doc fix.
2021-08-19 15:29:49 +03:00
Lars Ingebrigtsen
6276f73115 stterm doesn't understand all codes that xterm does
* lisp/term/st.el (xterm-st-extra-capabilities): New user option
(bug#50119).
(terminal-init-st): Use it to avoid a two-second timeout.
2021-08-19 14:18:32 +02:00
João Távora
37f0ea99f8 ; Correct :version tag of icomplete-selected-match face
* lisp/icomplete.el (icomplete-selected-match): Fix :version
2021-08-19 12:16:03 +01:00
João Távora
2be8e2ffc9 Section by 'group-function' in Icomplete and Fido's vertical modes
Fixes: bug#48545

* lisp/icomplete.el (icomplete--augment): Rewrite from icomplete--affixate.
(icomplete--render-vertical): Rework.
(icomplete--vertical-minibuffer-setup): Separator is hardcoded "\n", no
need to set.
2021-08-19 12:16:03 +01:00
João Távora
2c699b87c2 Improve fix of bug#49888 on no-pattern flex sorting
This version is functionally equivalent, but doesn't duplicate any
code.  When nothing "flexy" is happening, it works by simply not doing
any metadata adjustments, instead of attempting to synthesize a
function to mimic the non-flex case.

* lisp/minibuffer.el (completion--flex-adjust-metadata): Simplify.
2021-08-19 12:16:03 +01:00
Dmitry Gutov
fba64e1697 Fix vc-root-diff broken with Git as well
* lisp/vc/vc.el (vc-root-diff): Fix similar to 3502321403 by
avoiding the abbreviated directory name in argument (bug#39452).
2021-08-19 03:57:58 +03:00
Juri Linkov
9b31ad3609 * lisp/progmodes/xref.el (xref--collect-matches): Widen temporarily. 2021-08-18 20:02:39 +03:00
Juri Linkov
1a4ed8ee78 * lisp/mouse.el: More fixes for context-menu.
(context-menu-map): Remove menu title "Context Menu" (bug#50067).
(context-menu-minor): Reverse sub-menus to display exactly in the same order
as on the menu bar.
2021-08-18 20:01:03 +03:00
Lars Ingebrigtsen
15a8026caf Disable auto compositions on the Linux console only
* lisp/term/linux.el (terminal-init-linux): Disable auto
compositions on "linux" consoles (bug#21363).

* src/composite.c (inhibit_auto_composition): New function to
implement this.
(composition_compute_stop_pos, composition_adjust_point)
(Ffind_composition_internal): Use it.
(syms_of_composite): Document it.

* src/lisp.h: Export tty_type_name.

* src/term.c (tty_type_name): Factored out.
(Ftty_type): Use it.
2021-08-18 16:24:40 +02:00
Peter Münster
fa4a63c689 Add menu bindings to new functions in image-dired.el
* lisp/image-dired.el (image-dired--with-marked): New macro for
cycling over marked thumbnails.
(image-dired-tag-thumbnail, image-dired-tag-thumbnail-remove): Can
handle now also all marked thumbnails.
(image-dired-tag-marked-thumbnails): Remove it, because it's
obsoleted by `image-dired-tag-thumbnail' now.
(image-dired-delete-marked): Use new macro
`image-dired--with-marked', and add command to menu (bug#50000).
2021-08-18 14:53:25 +02:00
pillule
f26a027d6b Fix ediff3 layouts with window-combination-resize non-nil (Bug#49277)
* lisp/vc/ediff-wind.el (ediff-setup-windows-plain-compare)
(ediff-setup-windows-multiframe-compare): Fix three windows
layouts produced by ediff3 when 'window-combination-resize'
was customized to t and 'even-window-sizes' to nil.
2021-08-18 09:21:06 +02:00
pillule
eddb003f30 Fix behavior when switch-to-prev-buffer-skip is a function (Bug#49275)
* lisp/window.el (switch-to-prev-buffer)
(switch-to-next-buffer): More correctly handle cases where
'switch-to-prev-buffer-skip' is a function.
2021-08-18 09:16:06 +02:00
Andrea Corallo
7fa5dec86e * Fix `native-compile-target-directory' effectiveness for async compilation.
* lisp/emacs-lisp/comp.el (comp-run-async-workers): Forward to async
workers `native-compile-target-directory'.
2021-08-17 23:47:05 +02:00
Glenn Morris
ca781e4430 * lisp/mouse.el (context-menu-filter-function): Fix type. 2021-08-17 11:31:24 -07:00
Eli Zaretskii
b960e1aea2 ; Fix a comment in a recent commit.
* lisp/help-mode.el (help-mode-syntax-table): Fix punctuation in a
comment.
2021-08-17 15:40:05 +03:00
Michalis V
00fdf80e21 Improve `forward-sexp' in *Help* buffers
* lisp/help-mode.el (help-mode-syntax-table): New variable (bug#39134).
(help-make-xrefs): Use it to make picking out symbols in curved
quotes work reliably.
(help-xref-on-pp): Ditto.
2021-08-17 14:20:57 +02:00
João Távora
e6fb7e44cc Bind <up> and <down> in icomplete-vertical-mode
Suggested by Ergus <spacibba@aol.com>

* lisp/icomplete.el (icomplete-vertical-mode-minibuffer-map): Bind
<up> and <down>
2021-08-17 13:06:06 +01:00
João Távora
96bbd6f0a7 Jump to first,last completion with M-<, M-> in icomplete-vertical-mode
Fixes: bug#49005

Co-authored-by: Simon Lang <simon.lang@outlook.com>

* lisp/icomplete.el (icomplete-backward-completions): Return
non-nil iff something was stepped.  Ajust docstring.
(icomplete-forward-completions): Adjust docstring.
(icomplete-vertical-goto-first, icomplete-vertical-goto-last): New commands.
(icomplete-vertical-mode-minibuffer-map): Bind new commands to M-< and M->.
2021-08-17 12:56:38 +01:00
Juri Linkov
bf1ec4952e Merge branch 'feature/context-menu' 2021-08-17 11:11:35 +03:00
Dmitry Gutov
9e2cc406d3 ruby-mode imenu: Support methods with modifiers
* lisp/progmodes/ruby-mode.el (ruby-imenu-create-index-in-block):
Support methods with modifiers (visibility or otherwise)
(bug#50079).
2021-08-17 04:07:19 +03:00
Dmitry Gutov
fd7f2077bc vc-git-region-history: Fix to call 'diff' more correctly
* lisp/vc/vc-git.el (vc-git-region-history):
Fix to pass a list to the backend 'diff' command (bug#39452).
2021-08-17 03:32:12 +03:00
João Távora
a126c06b0a Make icomplete-vertical-mode take immediate effect (bug#49075)
* etc/NEWS: Mention change.

* lisp/icomplete.el (icomplete-vertical-mode):
(fido-vertical-mode): Tweak docstring.  Turn on
icomplete-mode. and fido-mdoe
2021-08-16 23:18:27 +01:00