1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-09 13:10:57 -08:00
Commit graph

161920 commits

Author SHA1 Message Date
Po Lu
83a497ee87 Prevent crashes upon trying to focus a child frame on click
* src/xterm.c (handle_one_xevent): Do not try to activate
override-redirect frames.  Explain why.
(x_focus_frame): Catch errors around XSetInputFocus.
2022-11-14 14:07:04 +08:00
Dmitry Gutov
c0474ca21d Hardcode "-name" instead of using find-name-arg
* lisp/progmodes/project.el (project--files-in-directory):
Hardcode "-name" instead of using find-name-arg (bug#59023).
2022-11-14 02:19:10 +02:00
Juri Linkov
9d5fc2c7eb * lisp/minibuffer.el (set-message-functions): New user option.
(set-message-function): Change the default from
'set-minibuffer-message' to 'set-message-functions'.
'set-minibuffer-message' is set as the default value
of the user option 'set-message-functions'.
(set-message-functions): New function.
(inhibit-message-regexps): New customizable variable (bug#52314).
(inhibit-message): New function.
(multi-message-timeout, multi-message-max): New defcustoms.
(multi-message-separator, multi-message-list): New variables.
(set-multi-message): New function.
2022-11-13 20:57:50 +02:00
Stefan Kangas
a5bf6fb526 Fix suggest-key-bindings displaying key as command
* lisp/simple.el (execute-extended-command--describe-binding-msg):
New function factored out from...
(execute-extended-command): ...here.  Fix bug where a key binding was
displayed as a command with 'suggest-key-bindings'.  (Bug#59247)
* test/lisp/simple-tests.el
(simple-execute-extended-command--describe-binding-msg): New test.
2022-11-13 19:46:02 +01:00
Juri Linkov
443bd35e86 * lisp/tab-bar.el: More improvements for tab-bar-auto-width (bug#59208)
(tab-bar-auto-width): Use add-face-text-property instead of propertize.
Prevent from going into infinite loops.  More optimizations.
(tab-bar-format-align-right): Use add-face-text-property, not propertize.
2022-11-13 20:16:17 +02:00
Ingo Lohmar
7d53164162 Eglot: fix null scopeUri regression in workspace/configuration
* lisp/progmodes/eglot.el (eglot-handle-request):
Commit 1a2d603bb3 changed
`eglot--uri-to-path' to return a nil uri untouched.  (Before,
`url-unhex-string' turned the parsed all-nil uri record into the empty
string.)

A nil return value must now be handled in the caller, do that for the
workspace/configuration handler to avoid an uncaught error.
2022-11-13 17:48:36 +01:00
Stefan Kangas
ae1a6b5bdf ; * lisp/simple.el (execute-extended-command): Improve comments. 2022-11-13 16:53:31 +01:00
Stefan Kangas
90a7dee79d New test for execute-extended-command helper defun
* test/lisp/simple-tests.el
(simple-execute-extended-command--shorter): New test.
2022-11-13 15:34:02 +01:00
Stefan Kangas
73c03d64ce Prefer defvar-keymap in sql.el
* lisp/progmodes/sql.el (sql-interactive-mode-map, sql-mode-map):
Prefer defvar-keymap.
2022-11-13 15:17:07 +01:00
Davide Masserut
ae9e441415 Add new Go modes to eglot-server-programs
* lisp/progmodes/eglot.el (eglot-server-programs): Add new major modes
for Go to be used with gopls.  (Bug#59245)
2022-11-13 14:40:45 +01:00
Po Lu
7a9beac461 Fix bug#59075
* src/nsimage.m (ns_can_use_native_image_api): Do not use native
image APIs for SVG images when RSVG is present.  (bug#59075)
2022-11-13 17:30:49 +08:00
Po Lu
756373a772 Fix warnings without XCB or XFixes
* src/xterm.c (x_term_init): Don't USE_SAFE_ALLOCA or call
SAFE_FREE outside of where it is actually used.  For some reason
the compiler still emitted warnings despite the ((void)
SAFE_ALLOCA (0)) statement.
2022-11-13 15:35:02 +08:00
Eli Zaretskii
695dbd3db4 ; Improve documentation of text-scale adjust commands
* lisp/face-remap.el (global-text-scale-adjust)
(text-scale-adjust): Doc fixes.  (Bug#59122)
2022-11-13 08:56:35 +02:00
Po Lu
47b377f64b Prevent non-local exits from ns-in-echo-area
* src/nsterm.m (ns_in_echo_area_1):
(ns_in_echo_area_2):
(ns_in_echo_area): New functions.
([EmacsView firstRectForCharacterRange:]): Call them instead.
(syms_of_nsterm): New defsym.
2022-11-13 09:04:25 +08:00
Michal Dubiel
9d334f558a eglot: Support signature labels without a function name
* lisp/progmodes/eglot.el (eglot--sig-info): Support signature labels
without a function name.  (Bug#58777)

Copyright-paperwork-exempt: yes
2022-11-12 22:29:42 +01:00
Morgan Smith
4ccc385ab1 vc-git: Ensure git doesn't try to colorize stashes
* lisp/vc/vc-git.el (vc-git-stash-show): Add --color=never to git
flags.  (Bug#59158)
2022-11-12 20:34:50 +01:00
Shohei YOSHIDA
d794f1d3f2 Add cperl-mode to eglot-server-programs 2022-11-12 20:33:02 +01:00
Alan Mackenzie
f8c11b5a92 .dir-locals.el (C entry). Add NO_INLINE to c-noise-macro-names 2022-11-12 15:30:38 +00:00
Po Lu
e7614cc9ac Correctly handle key map updates on Haiku
* src/haiku_support.cc (MessageReceived): Handle
B_KEY_MAP_LOADED by clearing the previous keymap.
2022-11-12 13:11:00 +00:00
Po Lu
2bac9d4693 Handle request serial wraparound more correctly
* src/xterm.c (X_COMPARE_SERIALS): Remove macro.
(x_is_serial_more_than, x_is_serial_more_than_or_equal_to)
(x_is_serial_less_than, x_is_serial_less_than_or_equal_to): New
functions.
(x_find_error_handler, x_request_can_fail)
(x_clean_failable_requests, x_stop_ignoring_errors): Use those
functions to perform request serial comparison.
2022-11-12 19:01:30 +08:00
Po Lu
505e8c5b29 ; * src/xselect.c (x_handle_selection_request): Fix typo in last change. 2022-11-12 19:01:30 +08:00
Po Lu
25c6bc7a3d Fix implementation of MULTIPLE
* src/xselect.c (x_handle_selection_request): Make sure the type
of a reply to a MULTIPLE request is ATOM_PAIR.
2022-11-12 19:01:30 +08:00
Stefan Kangas
75fb59c55e * doc/lispref/intro.texi: Fix PDF output without VERSION. (Bug#59199) 2022-11-12 09:28:18 +01:00
Eli Zaretskii
26730d20cc ; * lisp/dired.el (dired--unhide): Remove FIXME. (Bug#59047) 2022-11-12 09:04:42 +02:00
Po Lu
0aea7da80b * lisp/xwidget.el: Improve Commentary. 2022-11-12 07:06:53 +01:00
Stefan Kangas
b5346eb84d Prefer defvar-keymap in cus-theme.el
* lisp/cus-theme.el (custom-new-theme-mode-map)
(custom-theme-choose-mode-map): Prefer defvar-keymap.
2022-11-12 07:02:30 +01:00
Dmitry Gutov
d2f956807e project--buffer-list: Remove as unused
* lisp/progmodes/project.el (project--buffer-list):
Remove as unused (pointed out in bug#59153 by Juri).
2022-11-12 03:34:41 +02:00
Eric Abrahamsen
0a4f73d300 Mention obsolete gnus/nnir package in Gnus manual
* doc/misc/gnus.texi (nnir): Provide some hints for upgrade.
2022-11-11 10:59:00 -08:00
Brian Leung
be17456063 Make Eglot consider FileSystemWatcher.kind when watching files
bug#58677

* eglot.el (eglot-register-capability
  workspace/didChangeWatchedFiles): Rework

Only send notifications of interest, as determined by the optional LSP
FileSystemWatcher.kind bitmask provided by the server.

When the FileSystemWatcher.kind property is omitted, use the default
value of 7, which is computed from taking the bitwise OR operation
WatchKind.Create (1) | WatchKind.Change (2) | WatchKind.Delete (4).
2022-11-11 15:22:06 +00:00
Stefan Kangas
6f48b46b03 ; Fix typos 2022-11-11 15:52:37 +01:00
Stefan Kangas
014176f283 ; * lisp/xwidget.el: Improve Commentary. 2022-11-11 15:27:13 +01:00
Gerd Möllmann
6d9065b748 Fix &key parameters called without arguments (bug#58714)
* lisp/emacs-lisp/cl-macs.el (cl--do-arglist): Check for missing
argument.
* test/lisp/emacs-lisp/cl-macs-tests.el (cl-&key-arguments): New test.
2022-11-11 14:13:46 +01:00
Stefan Kangas
c64d94c849 eglot: Remove menu entry for manual
* lisp/progmodes/eglot.el (eglot-manual): Make obsolete.  Open the
eglot info manual instead of the less exhaustive README.
(eglot-menu): Remove entry for reading the manual.  (Bug#58892)
2022-11-11 13:58:37 +01:00
João Távora
23b49c0178 ; Tweak comment in lisp/progmodes/eglot.el (bug#58790)
* lisp/progmodes/eglot.el (eglot--uri-to-path): Tweak comment.
2022-11-11 09:31:00 +00:00
Eli Zaretskii
05d1186b7a ; Fix a typo in last change. 2022-11-11 10:22:29 +02:00
Eli Zaretskii
d764a2bfa8 ; * lisp/progmodes/eglot.el (eglot--path-to-uri): Improve commentary. 2022-11-11 10:21:45 +02:00
Eli Zaretskii
161cb6034c ; * CONTRIBUTE: Clarify the log message line width guidelines. 2022-11-11 09:14:14 +02:00
Stefan Kangas
0f53523775 Remove redundant library installation instructions
* lisp/apropos.el:
* lisp/mail/feedmail.el:
* lisp/mail/mail-hist.el:
* lisp/org/org-ctags.el:
* lisp/org/org-protocol.el:
* lisp/progmodes/ebnf2ps.el:
* lisp/progmodes/mixal-mode.el:
* lisp/progmodes/perl-mode.el:
* lisp/savehist.el:
* lisp/textmodes/table.el:
* lisp/vc/smerge-mode.el: Remove redundant installation instructions
for packages bundled with Emacs.
2022-11-11 04:29:29 +01:00
Po Lu
ea8ed105fd Slightly adjust EWMH frame activation code for child frames
* src/xterm.c (x_get_toplevel_parent): New function.
(x_focus_frame): Do not use EWMH activation in two cases: focus
transfers to child frames (this is not guaranteed to work if the
focus and the child frame do not share the same toplevel) or
focus transfers from child frames to their toplevel parents.
2022-11-11 10:31:57 +08:00
Stefan Kangas
52d9c51816 * lisp/progmodes/hideshow.el: Improve Commentary. 2022-11-11 01:55:11 +01:00
Stefan Kangas
025d28ed89 Prefer defvar-keymap in hideshow.el
* lisp/progmodes/hideshow.el (hs-minor-mode-map): Prefer
defvar-keymap.
2022-11-11 01:48:42 +01:00
dannyfreeman
1a2d603bb3 Eglot: Only handle URIs with the file:// scheme (bug#58790)
Eglot will not attempt to parse URIs that are not file:// type at all.
Instead let 'file-name-handler-alist' entries to deal with those.  Not
parsing them at all allows the 'file-name-handler-alist' regexps to
identify them more accurately.

By also checking if Eglot received a URI in 'eglot--path-to-uri',
'file-name-handler-alist' can provide the non-file type URI back to
the lsp server, which presumably will know how to handle them since it
is also giving them out to clients.

This issue originated with clojure-lsp sending clients "jar:" type
URIs that Emacs is unable to handle out of the box.  Before this
change, "jar:" URIs were parsed once, but since they contain a nested
URI, this resulted in a file being dispatched with a partially parsed
path that looked like "file://path/to.jar!/path/in/jar".

* lisp/progmodes/eglot.el (eglot--path-to-uri): Noop if already an
URI.  (eglot--uri-to-path):  Only handle file:// URIs
2022-11-10 22:39:09 +00:00
João Távora
c3b64985aa Improve Eglot's docstrings and manual
The examples in the manual can now be copy-pasted to user's init
files as-is.

* doc/misc/eglot.texi (Setting Up LSP Servers): Use
`with-eval-after-load'.  Add eglot-alternatives example.
(Customizing Eglot): Use 'require and fix  a typo.

* lisp/progmodes/eglot.el (eglot-server-programs): Mention
eglot-alternatives in eglot-server-program's docstring.
2022-11-10 21:10:49 +00:00
Juri Linkov
2e8551c076 ; * lisp/tab-line.el (tab-line-cache-key-function): Fix docstring (bug#57848). 2022-11-10 20:35:58 +02:00
Eli Zaretskii
53f25609fc Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2022-11-10 19:18:28 +02:00
Evgeni Kolev
c833b291f5 Ignore errors when shutting down all LSP servers (bug#59146)
eglot-shutdown-all has a bug that results in partially stopping
servers: when a server shutdown timeouts (1.5s), an error is
propagated and eglot-shutdown-all does not try to shutdown the rest of
the servers.

* eglot.el (eglot-shutdown-all): Ignore errors when shutting down
  servers, converting errors to messages.
2022-11-10 17:18:13 +00:00
Eli Zaretskii
702a47f4f6 Don't reset the inbox buffer's modified status in Rmail
* lisp/mail/rmail.el (rmail-get-new-mail-1): Don't mark the buffer
unmodified if it was modified before getting new mail.  (Bug#59108)
2022-11-10 19:16:40 +02:00
Arash Esbati
dc4aef3b85 Support 'texlab' LSP server in Eglot OOTB
* lisp/progmodes/eglot.el (eglot-server-programs): Add support for
'texlab' LSP server for tex-mode and similar languages.
2022-11-10 19:03:10 +02:00
Alan Mackenzie
ed067f08fe Add to /etc/NEWS a mention of the new C++20 support in CC Mode
* etc/NEWS.  A new section about C++20 support.

* lisp/progmodes/cc-defs.el (c-version): Update to 5.35.2.
2022-11-10 11:57:42 +00:00
Eli Zaretskii
2a7f01aa38 Fix initialization of module functions
* src/emacs-module.c (allocate_module_function): Fix
initialization of module functions.  Suggested by Richard Copley
<rcopley@gmail.com>.  (Bug#59104)
2022-11-10 12:55:16 +02:00