]> git.eshelyaron.com Git - emacs.git/log
emacs.git
2 years agoMerge branch 'master' into feature/pkg
Gerd Möllmann [Mon, 14 Nov 2022 07:04:22 +0000 (08:04 +0100)]
Merge branch 'master' into feature/pkg

2 years agoPrevent crashes upon trying to focus a child frame on click
Po Lu [Mon, 14 Nov 2022 06:07:04 +0000 (14:07 +0800)]
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.

2 years agoHardcode "-name" instead of using find-name-arg
Dmitry Gutov [Mon, 14 Nov 2022 00:18:56 +0000 (02:18 +0200)]
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).

2 years ago* lisp/minibuffer.el (set-message-functions): New user option.
Juri Linkov [Sun, 13 Nov 2022 18:57:50 +0000 (20:57 +0200)]
* 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.

2 years agoFix suggest-key-bindings displaying key as command
Stefan Kangas [Sun, 13 Nov 2022 18:46:02 +0000 (19:46 +0100)]
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.

2 years ago* lisp/tab-bar.el: More improvements for tab-bar-auto-width (bug#59208)
Juri Linkov [Sun, 13 Nov 2022 18:16:17 +0000 (20:16 +0200)]
* 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.

2 years agoEglot: fix null scopeUri regression in workspace/configuration
Ingo Lohmar [Sun, 13 Nov 2022 16:27:12 +0000 (17:27 +0100)]
Eglot: fix null scopeUri regression in workspace/configuration

* lisp/progmodes/eglot.el (eglot-handle-request):
Commit 1a2d603bb3938ff68ed1a5412d131b41efd40a24 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.

2 years ago; * lisp/simple.el (execute-extended-command): Improve comments.
Stefan Kangas [Sun, 13 Nov 2022 14:58:48 +0000 (15:58 +0100)]
; * lisp/simple.el (execute-extended-command): Improve comments.

2 years agoNew test for execute-extended-command helper defun
Stefan Kangas [Sun, 13 Nov 2022 14:34:02 +0000 (15:34 +0100)]
New test for execute-extended-command helper defun

* test/lisp/simple-tests.el
(simple-execute-extended-command--shorter): New test.

2 years agoPrefer defvar-keymap in sql.el
Stefan Kangas [Sat, 12 Nov 2022 20:14:23 +0000 (21:14 +0100)]
Prefer defvar-keymap in sql.el

* lisp/progmodes/sql.el (sql-interactive-mode-map, sql-mode-map):
Prefer defvar-keymap.

2 years agoAdd new Go modes to eglot-server-programs
Davide Masserut [Sun, 13 Nov 2022 11:30:43 +0000 (12:30 +0100)]
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)

2 years agoFix bug#59075
Po Lu [Sun, 13 Nov 2022 09:30:37 +0000 (17:30 +0800)]
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)

2 years agoFix warnings without XCB or XFixes
Po Lu [Sun, 13 Nov 2022 07:34:16 +0000 (15:34 +0800)]
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.

2 years ago; Improve documentation of text-scale adjust commands
Eli Zaretskii [Sun, 13 Nov 2022 06:56:35 +0000 (08:56 +0200)]
; Improve documentation of text-scale adjust commands

* lisp/face-remap.el (global-text-scale-adjust)
(text-scale-adjust): Doc fixes.  (Bug#59122)

2 years agoPrevent non-local exits from ns-in-echo-area
Po Lu [Sun, 13 Nov 2022 01:03:51 +0000 (09:03 +0800)]
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.

2 years agoeglot: Support signature labels without a function name
Michal Dubiel [Sun, 23 Oct 2022 17:54:31 +0000 (19:54 +0200)]
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

2 years agovc-git: Ensure git doesn't try to colorize stashes
Morgan Smith [Wed, 9 Nov 2022 21:16:55 +0000 (16:16 -0500)]
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)

2 years agoAdd cperl-mode to eglot-server-programs
Shohei YOSHIDA [Sat, 12 Nov 2022 13:13:57 +0000 (22:13 +0900)]
Add cperl-mode to eglot-server-programs

2 years ago.dir-locals.el (C entry). Add NO_INLINE to c-noise-macro-names
Alan Mackenzie [Sat, 12 Nov 2022 15:30:38 +0000 (15:30 +0000)]
.dir-locals.el (C entry).  Add NO_INLINE to c-noise-macro-names

2 years agoCorrectly handle key map updates on Haiku
Po Lu [Sat, 12 Nov 2022 13:11:00 +0000 (13:11 +0000)]
Correctly handle key map updates on Haiku

* src/haiku_support.cc (MessageReceived): Handle
B_KEY_MAP_LOADED by clearing the previous keymap.

2 years agoHandle request serial wraparound more correctly
Po Lu [Sat, 12 Nov 2022 10:52:36 +0000 (18:52 +0800)]
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.

2 years ago; * src/xselect.c (x_handle_selection_request): Fix typo in last change.
Po Lu [Sat, 12 Nov 2022 07:51:02 +0000 (15:51 +0800)]
; * src/xselect.c (x_handle_selection_request): Fix typo in last change.

2 years agoFix implementation of MULTIPLE
Po Lu [Sat, 12 Nov 2022 07:50:43 +0000 (15:50 +0800)]
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.

2 years ago* doc/lispref/intro.texi: Fix PDF output without VERSION. (Bug#59199)
Stefan Kangas [Sat, 12 Nov 2022 05:35:21 +0000 (06:35 +0100)]
* doc/lispref/intro.texi: Fix PDF output without VERSION.  (Bug#59199)

2 years ago; * lisp/dired.el (dired--unhide): Remove FIXME. (Bug#59047)
Eli Zaretskii [Sat, 12 Nov 2022 07:04:42 +0000 (09:04 +0200)]
; * lisp/dired.el (dired--unhide): Remove FIXME.  (Bug#59047)

2 years ago* lisp/xwidget.el: Improve Commentary.
Po Lu [Sat, 12 Nov 2022 06:06:26 +0000 (07:06 +0100)]
* lisp/xwidget.el: Improve Commentary.

2 years agoPrefer defvar-keymap in cus-theme.el
Stefan Kangas [Sat, 12 Nov 2022 06:02:30 +0000 (07:02 +0100)]
Prefer defvar-keymap in cus-theme.el

* lisp/cus-theme.el (custom-new-theme-mode-map)
(custom-theme-choose-mode-map): Prefer defvar-keymap.

2 years agoproject--buffer-list: Remove as unused
Dmitry Gutov [Sat, 12 Nov 2022 01:34:41 +0000 (03:34 +0200)]
project--buffer-list: Remove as unused

* lisp/progmodes/project.el (project--buffer-list):
Remove as unused (pointed out in bug#59153 by Juri).

2 years agoMention obsolete gnus/nnir package in Gnus manual
Eric Abrahamsen [Fri, 11 Nov 2022 18:59:00 +0000 (10:59 -0800)]
Mention obsolete gnus/nnir package in Gnus manual

* doc/misc/gnus.texi (nnir): Provide some hints for upgrade.

2 years agoMake Eglot consider FileSystemWatcher.kind when watching files
Brian Leung [Tue, 2 Feb 2021 19:23:25 +0000 (11:23 -0800)]
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).

2 years ago; Fix typos
Stefan Kangas [Fri, 11 Nov 2022 14:46:23 +0000 (15:46 +0100)]
; Fix typos

2 years ago; * lisp/xwidget.el: Improve Commentary.
Stefan Kangas [Fri, 11 Nov 2022 14:26:09 +0000 (15:26 +0100)]
; * lisp/xwidget.el: Improve Commentary.

2 years agoFix &key parameters called without arguments (bug#58714)
Gerd Möllmann [Sun, 23 Oct 2022 08:14:10 +0000 (10:14 +0200)]
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.

2 years agoeglot: Remove menu entry for manual
Stefan Kangas [Fri, 11 Nov 2022 12:55:11 +0000 (13:55 +0100)]
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)

2 years ago; Tweak comment in lisp/progmodes/eglot.el (bug#58790)
João Távora [Fri, 11 Nov 2022 09:30:49 +0000 (09:30 +0000)]
; Tweak comment in lisp/progmodes/eglot.el (bug#58790)

* lisp/progmodes/eglot.el (eglot--uri-to-path): Tweak comment.

2 years ago; Fix a typo in last change.
Eli Zaretskii [Fri, 11 Nov 2022 08:22:29 +0000 (10:22 +0200)]
; Fix a typo in last change.

2 years ago; * lisp/progmodes/eglot.el (eglot--path-to-uri): Improve commentary.
Eli Zaretskii [Fri, 11 Nov 2022 08:21:45 +0000 (10:21 +0200)]
; * lisp/progmodes/eglot.el (eglot--path-to-uri): Improve commentary.

2 years ago; * CONTRIBUTE: Clarify the log message line width guidelines.
Eli Zaretskii [Fri, 11 Nov 2022 07:14:14 +0000 (09:14 +0200)]
; * CONTRIBUTE: Clarify the log message line width guidelines.

2 years agoRemove redundant library installation instructions
Stefan Kangas [Fri, 11 Nov 2022 03:29:29 +0000 (04:29 +0100)]
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.

2 years agoSlightly adjust EWMH frame activation code for child frames
Po Lu [Fri, 11 Nov 2022 02:31:14 +0000 (10:31 +0800)]
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.

2 years ago* lisp/progmodes/hideshow.el: Improve Commentary.
Stefan Kangas [Fri, 11 Nov 2022 00:53:41 +0000 (01:53 +0100)]
* lisp/progmodes/hideshow.el: Improve Commentary.

2 years agoPrefer defvar-keymap in hideshow.el
Stefan Kangas [Fri, 11 Nov 2022 00:48:42 +0000 (01:48 +0100)]
Prefer defvar-keymap in hideshow.el

* lisp/progmodes/hideshow.el (hs-minor-mode-map): Prefer
defvar-keymap.

2 years agoEglot: Only handle URIs with the file:// scheme (bug#58790)
dannyfreeman [Thu, 3 Nov 2022 13:39:16 +0000 (09:39 -0400)]
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

2 years agoImprove Eglot's docstrings and manual
João Távora [Thu, 10 Nov 2022 21:06:33 +0000 (21:06 +0000)]
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.

2 years ago; * lisp/tab-line.el (tab-line-cache-key-function): Fix docstring (bug#57848).
Juri Linkov [Thu, 10 Nov 2022 18:35:58 +0000 (20:35 +0200)]
; * lisp/tab-line.el (tab-line-cache-key-function): Fix docstring (bug#57848).

2 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Thu, 10 Nov 2022 17:18:28 +0000 (19:18 +0200)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

2 years agoIgnore errors when shutting down all LSP servers (bug#59146)
Evgeni Kolev [Thu, 10 Nov 2022 17:17:44 +0000 (17:17 +0000)]
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.

2 years agoDon't reset the inbox buffer's modified status in Rmail
Eli Zaretskii [Thu, 10 Nov 2022 17:16:40 +0000 (19:16 +0200)]
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)

2 years agoSupport 'texlab' LSP server in Eglot OOTB
Arash Esbati [Thu, 10 Nov 2022 09:18:43 +0000 (10:18 +0100)]
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.

2 years agoAdd to /etc/NEWS a mention of the new C++20 support in CC Mode
Alan Mackenzie [Thu, 10 Nov 2022 11:57:42 +0000 (11:57 +0000)]
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.

2 years agoFix initialization of module functions
Eli Zaretskii [Thu, 10 Nov 2022 10:55:16 +0000 (12:55 +0200)]
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)

2 years agoFix indentation for multi-line block start in Python mode
kobarity [Mon, 7 Nov 2022 13:24:44 +0000 (22:24 +0900)]
Fix indentation for multi-line block start in Python mode

* lisp/progmodes/python.el
(python-info-dedenter-opening-block-positions): Fix for multi-line
block start.
* test/lisp/progmodes/python-tests.el
(python-info-dedenter-opening-block-positions-6): New test. (Bug#59009)

2 years ago; * etc/NEWS: Mention that order of overlays might change. (Bug#59067)
Eli Zaretskii [Thu, 10 Nov 2022 10:21:10 +0000 (12:21 +0200)]
; * etc/NEWS: Mention that order of overlays might change.  (Bug#59067)

2 years ago; * src/buffer.c (Foverlays_in): Doc fix. (Bug#59067)
Eli Zaretskii [Thu, 10 Nov 2022 10:18:18 +0000 (12:18 +0200)]
; * src/buffer.c (Foverlays_in): Doc fix.  (Bug#59067)

2 years agoAvoid dumping core upon SIGHUP in non-interactive sessions
Eli Zaretskii [Thu, 10 Nov 2022 10:12:56 +0000 (12:12 +0200)]
Avoid dumping core upon SIGHUP in non-interactive sessions

* src/emacs.c (terminate_due_to_signal): Don't special-case
SIGINT.  Patch by Paul Eggert <eggert@cs.ucla.edu>.  (Bug#58956)

2 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Thu, 10 Nov 2022 10:09:39 +0000 (12:09 +0200)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

2 years ago; * test/lisp/dired-tests.el (dired-test-bug59047): Rename.
Eli Zaretskii [Thu, 10 Nov 2022 10:08:47 +0000 (12:08 +0200)]
; * test/lisp/dired-tests.el (dired-test-bug59047): Rename.

2 years ago* lisp/progmodes/cc-mode.el (c-fl-decl-start): Fix off-by-one error.
Alan Mackenzie [Thu, 10 Nov 2022 10:06:20 +0000 (10:06 +0000)]
* lisp/progmodes/cc-mode.el (c-fl-decl-start): Fix off-by-one error.

This fixes bug #59070.

2 years agoMake 'dired-hide-details-mode' work after 'dired-hide-subdir'
Gabriel do Nascimento Ribeiro [Sat, 5 Nov 2022 11:27:50 +0000 (08:27 -0300)]
Make 'dired-hide-details-mode' work after 'dired-hide-subdir'

* lisp/dired.el (dired--unhide): Restore text properties.
(Bug#59047)

* test/lisp/dired-tests.el (dired-test-bugXXXX): New test.

2 years agoRewrite the `kill-buffer-delete-auto-save' tests (bug#59028)
Matt Armstrong [Fri, 4 Nov 2022 19:43:30 +0000 (12:43 -0700)]
Rewrite the `kill-buffer-delete-auto-save' tests (bug#59028)

These tests had been annoying to me when run in interactive mode.
They failed to bind `kill-buffer-delete-auto-save' as needed, so they
depended on the user's settings, and they failed to mock out the
"Buffer modified, save?" prompt.

* test/src/buffer-tests.el (test-kill-buffer-auto-save): New helper
function that mocks the two different kinds of prompts that occur when
killing modified buffers that visit a file.  Tests fail if expected
prompts are not issued.
(test-kill-buffer-auto-save-default): Use it, and explicitly bind
`kill-buffer-delete-auto-save' to nil.
(test-kill-buffer-auto-save-delete): Delete it.
(test-kill-buffer-auto-save-delete-yes): New test for the "yes" half
of the old `test-kill-buffer-auto-save-delete'.
(test-kill-buffer-auto-save-delete-yes): Ditto for the "no" half.

2 years agoBetter support for 'textarea' and 'select' tags in EWW
Nicolas Graner [Wed, 2 Nov 2022 21:28:45 +0000 (22:28 +0100)]
Better support for 'textarea' and 'select' tags in EWW

* lisp/net/eww.el (eww-tag-textarea, eww-tag-select): Don't miss
'textarea' and 'select' tags.  (Bug#58973)

2 years agoBe a little more paranoid about XI 2.0 implementations
Po Lu [Thu, 10 Nov 2022 05:25:28 +0000 (13:25 +0800)]
Be a little more paranoid about XI 2.0 implementations

* src/xterm.c (xi_populate_device_from_info):
(xi_disable_devices): Do not restore valuator values if the
valuator info has a mode of Relative and a value of 0.0.

2 years agoMake 't' in bs-mode be more defensive
Juanma Barranquero [Thu, 10 Nov 2022 00:31:22 +0000 (01:31 +0100)]
Make 't' in bs-mode be more defensive

* lisp/bs.el (bs-visit-tags-table): Verify that the
buffer holds a tags-table file before using it as
such. This is identical to bug#54133 affecting
Buffer-menu, and this fix is copied from the one
by Eli Zaretskii in commit 794fbd1c07 of 2022-02-24.
Thanks to Bob Rogers <rogers@rgrjr.com> for noticing.

2 years agoOptimize c-bs-interval, changing its value from 5000 to 2000
Alan Mackenzie [Wed, 9 Nov 2022 21:28:18 +0000 (21:28 +0000)]
Optimize c-bs-interval, changing its value from 5000 to 2000

* lisp/progmodes/cc-engine.el (c-bs-interval): This optimization speeds
forward scrolling in a C Mode buffer by ~2.4%, backward scrolling by ~1.8%.

2 years ago* lisp/tab-bar.el (tab-bar-auto-width): Add selected-frame to the cache key.
Juri Linkov [Wed, 9 Nov 2022 17:29:37 +0000 (19:29 +0200)]
* lisp/tab-bar.el (tab-bar-auto-width): Add selected-frame to the cache key.

2 years agoAvoid assertion violations in matrix_row
Eli Zaretskii [Wed, 9 Nov 2022 14:25:02 +0000 (16:25 +0200)]
Avoid assertion violations in matrix_row

* src/xdisp.c (cursor_in_mouse_face_p): Avoid rare assertion
violations when the cursor's VPOS winds up being invalid for the
window.  (Bug#59147)

2 years ago* lisp/thread.el (thread-list-mode-map): Prefer defvar-keymap.
Stefan Kangas [Wed, 9 Nov 2022 14:10:24 +0000 (15:10 +0100)]
* lisp/thread.el (thread-list-mode-map): Prefer defvar-keymap.

2 years agoDelete emacs < 26.2 workaround in eglot--apply-text-edits
Stephen Leake [Wed, 9 Nov 2022 14:00:40 +0000 (06:00 -0800)]
Delete emacs < 26.2 workaround in eglot--apply-text-edits

* lisp/progmodes/eglot.el (eglot--apply-text-edits): Delete emacs <
26.2 workaround; fixes bug in ada-mode test.

2 years ago; Fix typos in help.texi
Eli Zaretskii [Wed, 9 Nov 2022 13:26:42 +0000 (15:26 +0200)]
; Fix typos in help.texi

* doc/lispref/help.texi (Documentation Groups): Fix typos.
Reported by Yuan Fu <casouri@gmail.com>.  (Bug#59136)

2 years agoTeach thing-at-point to recognize bracketed IPv6 URLs
F. Jason Park [Wed, 13 Jul 2022 08:54:19 +0000 (01:54 -0700)]
Teach thing-at-point to recognize bracketed IPv6 URLs

* lisp/thingatpt.el (thing-at-point-bounds-of-url-at-point): Allow
IPv6 addresses as hosts.  Overshoots in the case of bracketed markup
but is rescued by `thing-at-point--bounds-of-well-formed-url'.
* test/lisp/thingatpt-tests.el (thing-at-point-test-data): Add cases
for IPv6 URLs.  Bug#56514.

2 years agoMake the PGTK port display a loud warning when run under X
Po Lu [Wed, 9 Nov 2022 13:04:39 +0000 (21:04 +0800)]
Make the PGTK port display a loud warning when run under X

* src/pgtkterm.c (pgtk_display_x_warning): New function.
(pgtk_term_init): Call it.

2 years ago"Fix" iconification handling on PGTK
Po Lu [Wed, 9 Nov 2022 12:41:17 +0000 (20:41 +0800)]
"Fix" iconification handling on PGTK

* src/pgtkterm.c (pgtk_iconify_frame): Write some more comments
and refrain from setting the frame as iconified here.
(map_event): Remove redundant braces.
(window_state_event): Remove useless code and manage frame
visibility as correctly as possible under Wayland while
iconified.  (bug#55836)

2 years agoAvoid use of `uint' type in XKB code
Po Lu [Wed, 9 Nov 2022 12:17:39 +0000 (20:17 +0800)]
Avoid use of `uint' type in XKB code

* src/xterm.c (x_find_modifier_meanings, handle_one_xevent): Use
`unsigned int' instead of `uint'.

2 years ago* src/lread.c (syms_of_lread): Drop unused capture group.
Mattias Engdegård [Wed, 9 Nov 2022 10:54:57 +0000 (11:54 +0100)]
* src/lread.c (syms_of_lread): Drop unused capture group.

2 years agobytecomp.el (byte-recompile-directory): Fix negated ignore logic
Nicholas Vollmer [Tue, 8 Nov 2022 00:57:34 +0000 (19:57 -0500)]
bytecomp.el (byte-recompile-directory): Fix negated ignore logic

Previous logic would only compile files which matched the
byte-compile-ignore-files regular expression.  (Bug#59115)

2 years ago* lisp/tab-bar.el (tab-bar-auto-width): Use 'frame-inner-width'.
Juri Linkov [Wed, 9 Nov 2022 08:39:51 +0000 (10:39 +0200)]
* lisp/tab-bar.el (tab-bar-auto-width): Use 'frame-inner-width'.

2 years ago* lisp/tab-bar.el (tab-bar-get-buffer-tab): Add optional arg 'all-tabs'.
Juri Linkov [Wed, 9 Nov 2022 07:45:17 +0000 (09:45 +0200)]
* lisp/tab-bar.el (tab-bar-get-buffer-tab): Add optional arg 'all-tabs'.

2 years agoEUDC: Add ecomplete and mailabbrev backends
Alexander Adolf [Tue, 8 Nov 2022 18:39:19 +0000 (13:39 -0500)]
EUDC: Add ecomplete and mailabbrev backends

* doc/misc/eudc.texi (Overview): Add ecomplete and mailabbrev
nodes.
(ecomplete, mailabbrev): New nodes.
(Installation): Add ecomplete and mailabbrev nodes.
(LDAP Configuration): Use code formatting instead of quotes.
(macOS Contacts Configuration): Likewise.
(ecomplete Configuration): New node.
(mailabbrev Configuration): Likewise.
* etc/NEWS (EUDC): Mention ecomplete and mailabbrev backends,
mention eudc-server-hotlist default change.
* lisp/net/eudc-vars.el (eudc-known-protocols): Add ecomplete and
mailabbrev.
(eudc-server-hotlist): Add entries for ecomplete and mailabbrev.
* lisp/net/eudcb-ecomplete.el: New EUDC backend file.
* lisp/net/eudcb-mailabbrev.el: Likewise.
* test/lisp/net/eudc-resources/ecompleterc,
test/lisp/net/eudc-resources/mailrc: New eudc-tests resource
files.
* test/lisp/net/eudc-tests.el (eudc-test-rfc5322-quote-phrase)
(eudc-test-make-address, eudcb-ecomplete, eudcb-mailabbrev): New
test cases.

2 years agoEUDC: Deprecate eudc-server variable
Thomas Fitzsimmons [Tue, 8 Nov 2022 18:30:17 +0000 (13:30 -0500)]
EUDC: Deprecate eudc-server variable

* lisp/net/eudc-vars.el (eudc-server): Deprecate variable for
Emacs 29.1.

2 years ago* lisp/progmodes/eglot.el (eglot--pos-to-lsp-position): Improve comment
Stephen Leake [Tue, 8 Nov 2022 17:45:26 +0000 (09:45 -0800)]
* lisp/progmodes/eglot.el (eglot--pos-to-lsp-position): Improve comment

2 years agoCC Mode: Improve accuracy of recognition of bitfields
Alan Mackenzie [Tue, 8 Nov 2022 14:55:40 +0000 (14:55 +0000)]
CC Mode: Improve accuracy of recognition of bitfields

* lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1): When we've got two
identifiers followed by a colon, additionally check for a number (or
identifier) followed by a semicolon or comma before concluding we have a
bitfield.

2 years agoDon't use @w around @xref in ede.texi
Robert Pluim [Tue, 8 Nov 2022 09:40:43 +0000 (10:40 +0100)]
Don't use @w around @xref in ede.texi

Texinfo 7 warns about this now.

* doc/misc/ede.texi (ede-project-placeholder, ede-project,
ede-cpp-root-project, ede-simple-project,ede-simple-base-project,
ede-proj-project, project-am-makefile, ede-step-project, ede-target,
ede-proj-target, ede-proj-target-makefile,
semantic-ede-proj-target-grammar, ede-proj-target-makefile-objectcode,
ede-proj-target-makefile-archive, ede-proj-target-makefile-program,
ede-proj-target-makefile-shared-object, ede-proj-target-elisp,
ede-proj-target-elisp-autoloads,
ede-proj-target-makefile-miscelaneous, ede-proj-target-makefile-info,
ede-proj-target-scheme, project-am-target, project-am-objectcode,
project-am-program, project-am-header-noinst, project-am-header-inst,
project-am-lisp, project-am-texinfo, project-am-man,
ede-compilation-program, ede-compiler, ede-object-compiler,
ede-linker): Remove @w around @xref.

2 years agoClean up some duplicate event group conversion code
Po Lu [Tue, 8 Nov 2022 11:59:47 +0000 (19:59 +0800)]
Clean up some duplicate event group conversion code

* src/xterm.c (xi_convert_event_keyboard_state): New function.
Move keyboard event state over.
(handle_one_xevent): Use it where necessary.

2 years agoCC Mode: Stabilize the fontification in the presence of "register" keywords
Alan Mackenzie [Tue, 8 Nov 2022 11:53:37 +0000 (11:53 +0000)]
CC Mode: Stabilize the fontification in the presence of "register" keywords

This fixes bug #58883.

* lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1): New variable
unsafe-maybe.  Set it in CASE 10 rather than setting c-record-type-identifiers
to nil.  Near the end of the function, when unsafe-maybe is set, bind
c-promote-possible-types to 'just-one rather than t around the call to
c-forward-type.

2 years agoEUDC: Add eudc-ignore-options-file customization
Thomas Fitzsimmons [Tue, 8 Nov 2022 00:34:33 +0000 (19:34 -0500)]
EUDC: Add eudc-ignore-options-file customization

* etc/NEWS (EUDC): Document eudc-ignore-options-file.
* doc/misc/eudc.texi (The Server Hotlist): Likewise
* lisp/net/eudc-vars.el (eudc-ignore-options-file): New variable.
(eudc-options-file): Mention new variable.
* lisp/net/eudc.el: Warn on load if eudc-ignore-options-file is
set but the options file exists.
(eudc-set-server): Support
eudc-ignore-options-file.
(eudc-bookmark-server): Likewise.
(eudc-save-options): Likewise.  (Bug#56154)

2 years ago; * lisp/tab-bar.el (tab-bar-auto-width): Remaining renaming in docstring.
Juri Linkov [Mon, 7 Nov 2022 18:05:38 +0000 (20:05 +0200)]
; * lisp/tab-bar.el (tab-bar-auto-width): Remaining renaming in docstring.

2 years ago; Improve documentation of automatic tab-bar tab resizing
Eli Zaretskii [Mon, 7 Nov 2022 13:40:33 +0000 (15:40 +0200)]
; Improve documentation of automatic tab-bar tab resizing

* etc/NEWS:
* lisp/tab-bar.el (tab-bar-auto-width): Rename from
tab-bar-fixed-width.  All similar variables changed accordingly;
all users changed.
(tab-bar-auto-width, tab-bar-auto-width-max)
(tab-bar-auto-width-min): Doc fixes.

* etc/NEWS: Resurrect the lost Local variables section.

2 years agoAdd missing SAFE_FREE on XI 2.0 servers
Po Lu [Mon, 7 Nov 2022 12:33:28 +0000 (20:33 +0800)]
Add missing SAFE_FREE on XI 2.0 servers

* src/xterm.c (xi_populate_device_from_info): Add missing
SAFE_FREE.

2 years agoCC Mode: Fix infinite loop in c-brace-stack-at.
Alan Mackenzie [Mon, 7 Nov 2022 12:20:07 +0000 (12:20 +0000)]
CC Mode: Fix infinite loop in c-brace-stack-at.

This fixes bug #59038.  The infinite loop occurred with a buffer containing
Base-64 encoded text rather than appropriate C Mode text.

* lisp/progmodes/cc-engine.el (c-update-brace-stack): Don't execute
c-beginning-of-current-token unless the previous c-syntactic-re-search-forward
has succeeded at least once.

2 years agoAvoid invalid values showing up in scroll valuators
Po Lu [Mon, 7 Nov 2022 10:05:54 +0000 (18:05 +0800)]
Avoid invalid values showing up in scroll valuators

* src/xterm.c (xi_populate_device_from_info): Reset emacs_value
when invalid_p is cleared.

2 years ago* lisp/outline.el (outline-minor-mode): Ensure margins are either 0 or 1.
Juri Linkov [Mon, 7 Nov 2022 08:14:45 +0000 (10:14 +0200)]
* lisp/outline.el (outline-minor-mode): Ensure margins are either 0 or 1.

This check is necessary to make it idempotent to multiple calls.

2 years ago(itree_insert_gap, itree_delete_gap): Minor optimization
Stefan Monnier [Mon, 7 Nov 2022 05:38:43 +0000 (00:38 -0500)]
(itree_insert_gap, itree_delete_gap): Minor optimization

`limit` can get smaller in either of the two children of a node.
It can also happen that the root node itself has a low enough limit
that the loop can be interrupted right away.

The previous code only checked `limit` when going down to a left
child, which is not wrong, but tests suggest that it is also very
common to reach this limit when going to a right child, so move the
test accordingly.

* src/itree.c (itree_insert_gap, itree_delete_gap): Check `limit` for
all nodes, rather than only when following a `left` pointer.

2 years agoMerge from origin/emacs-28
Stefan Kangas [Sun, 6 Nov 2022 22:21:01 +0000 (23:21 +0100)]
Merge from origin/emacs-28

70fb03a49a ; * doc/emacs/search.texi (Lax Search): Improve suggestion...
5779df0c5b ; * doc/lispref/searching.texi: Remove reference to Posix....
46929f6b73 ; Improve documentation of character classes in regexps

2 years agoRevert "* lisp/vc/vc-git.el (vc-git--rev-parse): Allow abbreviating commits"
Philip Kaludercic [Sun, 6 Nov 2022 21:18:24 +0000 (22:18 +0100)]
Revert "* lisp/vc/vc-git.el (vc-git--rev-parse): Allow abbreviating commits"

This reverts commit 307ad210040251ea0de2e7f453350c4497bda874.

2 years agoFix sql-{beginning,end}-of-statement counting
Ingo Lohmar [Sun, 6 Nov 2022 16:31:05 +0000 (17:31 +0100)]
Fix sql-{beginning,end}-of-statement counting

* lisp/progmodes/sql.el (sql-beginning-of-statement, sql-end-of-statement):
Do not count statement separators if inside a string.

2 years ago; * lisp/emacs-lisp/package.el (package-load-all-descriptors): Use \`
Mattias Engdegård [Sun, 6 Nov 2022 14:59:58 +0000 (15:59 +0100)]
; * lisp/emacs-lisp/package.el (package-load-all-descriptors): Use \`

2 years ago; Avoid compiler warnings in 'extend_face_to_end_of_line'
Eli Zaretskii [Sun, 6 Nov 2022 14:45:30 +0000 (16:45 +0200)]
; Avoid compiler warnings in 'extend_face_to_end_of_line'

* src/xdisp.c (extend_face_to_end_of_line): Return if no
default_face is cached or could be realized.  This avoids
compilation warnings about NULL pointer dereferences.

2 years agoPrefer defvar-keymap in octave.el
Stefan Kangas [Sun, 6 Nov 2022 14:40:19 +0000 (15:40 +0100)]
Prefer defvar-keymap in octave.el

* lisp/progmodes/octave.el (octave-mode-map): Prefer
defvar-keymap.

2 years agoFix failing eshell alias tests
Stefan Kangas [Sun, 6 Nov 2022 14:34:58 +0000 (15:34 +0100)]
Fix failing eshell alias tests

* test/lisp/eshell/esh-var-tests.el (esh-var-test/alias/function)
(esh-var-test/alias/symbol-pair): Fix tests.  (Bug#59062)

2 years agoRevert "Pacify -Wnull-dereference"
Eli Zaretskii [Sun, 6 Nov 2022 14:31:25 +0000 (16:31 +0200)]
Revert "Pacify -Wnull-dereference"

This reverts commit dad452552bebf832e737ebb946b5eea6cd57f63f.
Please don't assume I write such code by omission.