1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-16 19:00:55 -08:00
Commit graph

90544 commits

Author SHA1 Message Date
Eli Zaretskii
40a758f5ce ; Minor fixes in documentation of recently-changed VC commands
* lisp/vc/vc.el (vc-print-branch-log, vc-create-branch)
(vc-create-tag, vc-retrieve-tag, vc-switch-branch): Doc fixes.
* lisp/vc/vc-hooks.el (vc-menu-map): Minor wording change in :help
text.

* doc/emacs/maintaining.texi (VC Change Log, Creating Branches):
Minor wording and markup changes.
2023-05-26 11:09:14 +03:00
Juri Linkov
e5f42706ce * lisp/progmodes/project.el: Move :safe from defcustom to autoload (bug#63469)
(project-vc-ignores, project-vc-merge-submodules)
(project-vc-include-untracked, project-vc-name)
(project-vc-extra-root-markers, project-kill-buffers-display-buffer-list):
Autoload the line that puts 'safe-local-variable' property on defcustom symbol
instead of using the :safe keyword.
2023-05-25 21:40:38 +03:00
Juri Linkov
3afe4a42e9 * lisp/vc/vc-annotate.el (vc-annotate-mode-menu): Quote vc-annotate-backend.
When unquoted it might get the nil value when vc-annotate.el is loaded
in non-vc-controlled buffer (bug#63689).
2023-05-25 21:33:11 +03:00
Juri Linkov
b62a2b08b8 Add vc-create/switch/print-branch to menu and update documentation (bug#63690)
* doc/emacs/maintaining.texi (VC Change Log):
Add 'C-x v b l' (vc-print-branch-log).
(Creating Branches): Add @kindex and @findex for vc-create-branch.
(Switching Branches): Add @kindex and @findex for vc-switch-branch.

* lisp/vc/vc-hooks.el (vc-menu-map): Add menu items for new
commands vc-create-branch and vc-switch-branch, and also
vc-print-branch-log.

* lisp/vc/vc.el (vc-print-branch-log): Improve docstring.
2023-05-25 21:24:23 +03:00
Michael Albinus
709d902002 Make last Tramp change less invasive
* lisp/net/tramp.el (tramp-dissect-file-name): Revert last change.
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory): Let-bind `tramp-default-proxies-alist'.
2023-05-25 15:40:45 +02:00
Eli Zaretskii
a72a1f24fc ; Fix last change. 2023-05-25 08:58:42 +03:00
Eli Zaretskii
5c6517a115 ; * lisp/menu-bar.el (popup-menu): Doc fix. 2023-05-25 08:57:28 +03:00
Eli Zaretskii
5aadb87d6f Fix 'use-dialog-box-p' and friends
* lisp/subr.el (use-dialog-box-p): Use dialog boxes also when
invoked from some window-system gesture.  (Bug#63655)
(y-or-n-p): Fix the description in the doc string of conditions
under which a dialog box will be used.

* src/fns.c (Fyes_or_no_p): Use the same condition for dialog
boxes as in 'use-dialog-box-p'.  Fix the description in the doc
string of conditions under which a dialog box will be used.

* doc/lispref/minibuf.texi (Multiple Queries, Yes-or-No Queries):
Fix the description of conditions under which a dialog box will be
used.
2023-05-23 17:44:23 +03:00
Stefan Monnier
0abb79ca09 Avoid duplicates when adding package dirs to load-path
Do not merge to master, we're going to delete this code there.

* lisp/emacs-lisp/package.el (package-activate-1): Check if the path
we're about to add is already in 'load-path', since package autoload
files have been updating 'load-path' for a decade.
2023-05-23 14:12:21 +02:00
Robert Pluim
6f6071c526 Avoid duplicate load-path entry when generating package autoloads
'file-name-directory' produces a path ending in '/', so that needs to be
run through 'directory-file-name' to avoid duplicate entries in
'load-path'.  (Bug#63625)

* lisp/emacs-lisp/package.el (package-generate-autoloads): Call
'directory-file-name' on the directory of 'load-file-name'.
2023-05-23 14:12:21 +02:00
Eli Zaretskii
fe22bf503f ; * lisp/progmodes/project.el (project-switch-use-entire-map): Doc fix. 2023-05-22 21:31:56 +03:00
Eli Zaretskii
64dbbde3b7 Fix visiting HTML files encoded in iso-2022 variants
* lisp/international/mule.el (sgml-xml-auto-coding-function)
(sgml-html-meta-auto-coding-function): Handle coding-systems whose
coding-system-type is iso-2022.  (Bug#63644)
2023-05-22 21:23:58 +03:00
Eli Zaretskii
6ad041939b Support 'isearch-allow-scroll' in 'pixel-scroll-precision-mode'
* lisp/pixel-scroll.el (pixel-scroll-precision)
(pixel-scroll-down, pixel-scroll-up): Put the 'scroll-command'
property on these commands.  (Bug#63640)
2023-05-22 14:20:38 +03:00
Andreas Schwab
ecccdc07a0 shr: allow moving between adjacent anchors
* lisp/net/shr.el (shr-urlify): Put shr-tab-stop only over first
position.
2023-05-22 13:13:29 +02:00
Michael Albinus
d6fb868cdd Fix multihop file name expansion in Tramp
* lisp/net/tramp.el (tramp-dissect-file-name): Set hop to nil if
NODEFAULT.  (Bug#63578)
2023-05-22 12:20:27 +02:00
Jens Schmidt
2a5c946f87 Preserve mark in comint-history-isearch
This preserves mark in `comint-history-isearch-backward' and
friends, which tend to set the mark on completion of the isearch
to unexpected positions.
* lisp/comint.el (comint-history-isearch-end): Set `isearch-opoint'
to point.  (Bug#63616)
2023-05-21 09:16:23 +03:00
Liu Hui
6b60c8142e Fix systemd unit completion for old versions of systemd
* lisp/pcmpl-linux.el (pcmpl-linux--systemd-units): Use '--no-legend'
for compatibility with older versions of systemctl.  (Bug#63411)
2023-05-20 18:01:02 +03:00
Eli Zaretskii
8c56557cd9 Fix Skeletons menu-bar menu in Python modes
* lisp/progmodes/python.el (python-mode, python-ts-mode): Call
'python-skeleton-add-menu-items' here, not in 'python-base-mode',
since the "Python" menu is not yet set up in the latter.
(Bug#63598)
2023-05-20 17:56:40 +03:00
Yuan Fu
cec9333dc5
Fix c-ts-mode--top-level-declarator
* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--top-level-declarator): Don't use treesit-node-match-p.
2023-05-20 00:45:39 -07:00
Yuan Fu
f571e8f1bb
Improve c-ts-mode font-lock for function names (bug#63390)
When a function definition has preproc directives in its body, it
can't correctly parse into a function_definition.  This fix tries to
recognize this case and highlight the function_declarator correctly.

* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--font-lock-settings): New rule.
(c-ts-mode--top-level-declarator): New function.
2023-05-19 16:11:23 -07:00
Juri Linkov
42a28ffdc2 * lisp/tab-bar.el: Don't use 'minibuffer-selected-window' (bug#62427).
(tab-bar-select-tab, tab-bar-new-tab-to):
Use 'window-minibuffer-p' instead of 'minibuffer-selected-window'.
And switch to 'get-mru-window' instead of 'minibuffer-selected-window'.
2023-05-19 21:14:16 +03:00
Juri Linkov
8e61d23f71 Split windows horizontally in places that use split to create a new window.
* lisp/tab-bar.el (tab-bar-new-tab-to):
* lisp/window.el (window-state-put):
To create a new window, split horizontally instead of vertically.
Use 'window-safe-min-width' for the SIZE arg of 'split-window'.
(bug#62592)
2023-05-19 21:04:50 +03:00
Eli Zaretskii
3bc5efb87e ; * lisp/emacs-lisp/benchmark.el (benchmark-progn): Fix declare form. 2023-05-18 17:20:36 +03:00
Eli Zaretskii
4daa6f7049 ; * lisp/simple.el (async-shell-command): Add commentary about 3rd arg. 2023-05-18 14:03:10 +03:00
Jens Schmidt
dc1a437d46 Clarify misleading comment in isearch.el
Clarify a misleading comment in isearch.el as to whether frame events
should exit an isearch or not (Bug#62032, Bug#41338 for background
information).
* lisp/isearch.el (isearch-mode-map): Replace the misleading comment.
(Bug#62032)

Copyright-paperwork-exempt: yes
2023-05-18 13:43:12 +03:00
Eli Zaretskii
af3b0dc53f Improve documentation of package-menu commands
* doc/emacs/package.texi (Package Menu): Document that some
package-menu filters accept lists of values interactively.

* lisp/emacs-lisp/package.el (package-menu-execute)
(package-menu-hide-package, package-menu-describe-package)
(package-menu-mark-delete, package-menu-mark-install)
(package-menu-mark-unmark, package-menu-backup-unmark)
(package-menu-quick-help, package-menu-get-status)
(package-menu--find-upgrades, package-menu-mark-upgrades)
(package-menu-filter-by-archive)
(package-menu-filter-by-description)
(package-menu-filter-by-keyword)
(package-menu-filter-by-name-or-description)
(package-menu-filter-by-name, package-menu-filter-by-status)
(package-menu-filter-by-version, package-menu-filter-marked)
(package-menu-describe-package): Doc fixes.
2023-05-18 09:41:59 +03:00
Basil L. Contovounesios
d879847cd4 Fix M-x completion-predicate under python-ts-mode
* lisp/progmodes/python.el (python--completion-predicate)
(python-shell--completion-predicate): Filter M-x completion based on
python-base-mode instead of python-mode.  This allows for
python-ts-mode as well (bug#63552).
2023-05-17 15:14:09 +01:00
Andrea Corallo
1e57b2b4c7 * Account for `byte-compile-warnings' during native compilation (bug#63302).
* lisp/emacs-lisp/comp.el (comp-final, comp-run-async-workers):
Forward `byte-compile-warnings' to child processes.
2023-05-17 15:13:17 +02:00
Philip Kaludercic
b5bfd808c6 Avoid duplicate VC packages in 'package-selected-packages'
* lisp/emacs-lisp/package-vc.el (package-vc--unpack-1): Check if
'package-selected-packages' already contains the package name.
(bug#63338)
2023-05-16 20:47:34 +02:00
Juri Linkov
c18f9f155f * lisp/tab-bar.el (tab-bar-new-tab-to): Set 'window-side' to nil (bug#62427).
This is still needed for the case when tab-bar-new-tab-choice is 'window'.
2023-05-15 20:32:04 +03:00
Eli Zaretskii
33485fe8f7 ; Better warning message when loading tree-sitter fails
* lisp/treesit.el (treesit-ready-p): Improve diagnostics on
MS-Windows when the tree-sitter library cannot be loaded at run
time.
2023-05-15 18:39:49 +03:00
Kyle Meyer
95a724abaa Update to Org 9.6.6 2023-05-14 21:04:37 -04:00
Eli Zaretskii
3aef46e466 Merge branch 'emacs-29' of git.sv.gnu.org:/srv/git/emacs into emacs-29 2023-05-14 08:02:15 -04:00
Eli Zaretskii
4627ede36b ; * lisp/ldefs-boot.el: Regenerate for emacs-29.0.91. 2023-05-14 07:57:52 -04:00
Mattias Engdegård
229af8e4b3 ; * lisp/progmodes/csharp-mode.el (csharp-ts-mode--defun-name): typo 2023-05-14 13:23:03 +02:00
Eli Zaretskii
5c8864fab4 ; * lisp/simple.el (async-shell-command): Doc fix. (Bug#63432) 2023-05-14 10:13:39 +03:00
Gabriel do Nascimento Ribeiro
b96dc472bc Ignore current-prefix-arg in async-shell-command
* lisp/simple.el (async-shell-command): Ignore current-prefix-arg and
always pass nil to second argument of `shell-command'.  (Bug#63432)
2023-05-14 09:24:16 +03:00
Joseph Turner
1e6a759436 Fix building of VC package manuals with relative includes
* lisp/emacs-lisp/package-vc.el (package-vc--build-documentation):
Invoke makeinfo with -I to ensure the package directory is always
consulted for @include statements.  (Bug#63337)
2023-05-13 19:16:57 +02:00
Cyril Arnould
61659f36c8 Another fix for VHDL mode highlighting
* lisp/progmodes/vhdl-mode.el (vhdl-version): Bump to 3.38.5.
(vhdl-compiler-alist): Fix the regexps and the doc string.

Copyright-paperwork-exempt: yes
2023-05-13 16:50:55 +03:00
Eli Zaretskii
7acae22f42 Fix auto-filling in Texinfo mode
This fixes auto-filling in Texinfo buffers.  It was broken by the
fix to bug#49558, which made M-q fill over-long @noindent lines by
refraining from customizing 'paragraph-separate' in Texinfo mode.
The underlying problem here is that 'auto-fill-mode' doesn't call
mode-specific filling functions, but does its job by itself, and
depends on 'forward-paragraph' to find the beginning of the
paragraph as appropriate for calculation of 'fill-prefix', and a
different value of 'paragraph-separate' broke that.  As a side
effect, the change below also changes paragraph-movement commands
in Texinfo back to how they behaved prior to that bugfix, but I
don't see why the paragraph-movement behavior introduced by that
fix made more sense.  Try to move through a series of
@-directives, like a paragraph preceded by several @cindex
entries, and you will see the inconsistencies.  In any case, the
adverse effects of that fix on auto-filling is unacceptable.

* lisp/textmodes/texinfo.el (fill-paragraph-separate): New
variable.
(texinfo-mode): Set 'fill-paragraph-separate' to the default value
of 'paragraph-separate'.  Customize 'paragraph-separate' to the
Texinfo-specific value, as it was before commit dde591571a.
(texinfo--fill-paragraph): Bind 'paragraph-separate' to the value
of 'fill-paragraph-separate', to keep 'M-q' happy.
2023-05-13 11:28:38 +03:00
Gregory Heytings
dcf8c01102 Merge branch 'scratch/long-lines-cleanup' into 'emacs-29' 2023-05-13 00:13:44 +02:00
Philip Kaludercic
ba2c76fa2b Ensure that package menu respects 'package-install-upgrade-built-in'
* lisp/emacs-lisp/package.el (package-menu--find-upgrades): Check if
built-in packages can be upgraded if
'package-install-upgrade-built-in' is non-nil.
2023-05-12 09:41:55 +02:00
Philip Kaludercic
6fa9332e7c Ensure that EXTRA-DATA are always written when generating autoloads
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate): Handle
edge-case where no autoloads are found.  (Bug#63260)
2023-05-12 09:41:55 +02:00
Jonas Bernoulli
60d5a015d1
Update to Transient v0.4.0
Or strictly speaking v0.4.0-1-g428576a4.)
2023-05-11 17:47:30 +02:00
Eli Zaretskii
b8bcd42cab Revert "Don't have nntp-report signal an error"
This reverts commit 032969e8c6.
The commit is being reverted because it caused bug#62845.
2023-05-11 12:59:46 +03:00
Eli Zaretskii
ef1f4068f6 ; * lisp/wid-edit.el (widget-specify-insert): Fix debug spec. (Bug#63437) 2023-05-11 12:54:34 +03:00
Alan Mackenzie
09bf476836 Make c-emacs-features use the proper binding of parse-sexp-lookup-properties
This is relevant for bug #58558, although it does not fix it.  Due to a wrong
ordering of with-current-buffer and a let form, the function overwrote the
global value of parse-sexp-lookup-properties and two other variables.

* lisp/progmodes/cc-defs.el (c-emacs-features): Change the nesting of
with-current-buffer and let so that the let bindings get used.
2023-05-10 11:16:32 -04:00
Eli Zaretskii
c9e2a5ec26 ; * lisp/obsolete/autoload.el (make-directory-autoloads): Doc fix. 2023-05-10 16:51:17 +03:00
Eli Zaretskii
2438fa2e6c ; Fix minor documentation issue ion replace.el
* lisp/replace.el (query-replace, query-replace-regexp): Doc fix.
(Bug#63397)
2023-05-10 16:01:28 +03:00
João Távora
f1675df3d0 Fido-mode: never shadow 'external' completion style
As explained in the manual (20.7.2 Fast minibuffer selection)
'fido-mode' and 'fido-vertical-mode' give priority the "flex"
completion style.

In fact, bug#62015 was recently fixed in commit because that priority
was not taking place correctly and some completions were missed.

However, an exception must be made for the 'external' completion
style.

That style, made available by the lisp/external-completion.el library,
is specifically designed to work with backends that provide only a
partial view of all completions.  If we allow 'flex' to step in front
of 'external' it could mean that 'flex' matches something and
'external' isn't triggered as it probably should.

To reproduce have the rust-mode ELPA package and the rust-analyzer LSP
server handy.  Then:

  emacs -Q -f package-initialize main.rs

Where main.rs is this content:

  fn foo1()    {} fn foo2()    {} fn foo3() {}
  fn foobar1() {} fn foobar2() {} fn foobar3() {}

The rust-analyzer server can be quickly configured to return only 3
workspace symbols max, so evaluate:

  (setq-default eglot-workspace-configuration
                '(:rust-analyzer
                    (:workspace (:symbol (:search (:limit 3))))))

Now start M-x eglot and M-x fido-vertical-mode and type C-u M-. to
find an arbitrary symbol in this one-file project.

Type 'f'.  You will see the three foo's are listed, correctly.

Now type '3'.   You will only see "foo3".

But that's wrong because "foobar3" was available, if only the server
had been asked for it.  This commit fixes the situation and no
completions are lost.

As an unfortunate side-effect of this commit, the fontification of
completions-common-part on the matches is lost, but that is not worse
than missing out on completions and there are better ways to recover
the fontification anyway (in external-completion.el).

See also:
https://github.com/joaotavora/eglot/discussions/1219#discussioncomment-5818336

* lisp/icomplete.el (icomplete--fido-ccd): Do not touch entries
with 'external in them.

Do not merge to master.
Backport:

(cherry picked from commit 0e8d8a7228)
2023-05-09 09:42:10 +01:00