Tom Tromey [Sat, 15 Jan 2022 09:30:24 +0000 (10:30 +0100)]
Use "server complete" instead of "complete" in gud-gdb-completions
* lisp/progmodes/gud.el (gud-gdb-completions): gud-gdb sends a
"complete" command to gdb to implement command line completion. It
would be better to send "server complete". This is what Emacs does
for other behind-the-scenes commands it sends (bug#52922).
Po Lu [Sat, 15 Jan 2022 05:30:28 +0000 (05:30 +0000)]
Find a way to make lowering frames work on Haiku
* doc/lispref/frames.texi (Raising and Lowering): Document that
lowering frames is now supported on Haiku.
* src/haikuterm.c (haiku_frame_raise_lower): Implement a hack to
lower frames.
Robert Pluim [Thu, 13 Jan 2022 14:54:28 +0000 (15:54 +0100)]
spelling-tests.el: use ert-with-temp-directory
* test/lisp/so-long-tests/spelling-tests.el (so-long-spelling): Use
;ert-with-temp-directory' instead of passing :directory to
'ert-with-temp-file', and restore the prefix/suffix values used
originally with 'make-temp-file'.
Robert Pluim [Thu, 13 Jan 2022 09:57:56 +0000 (10:57 +0100)]
spelling-tests.el: ignore errors when checking for ispell
ispell-valid-dictionary-list can signal an error, eg when the local
hunspell installation cannot find any dictionaries, so it's best to
ignore that error.
* test/lisp/so-long-tests/spelling-tests.el (so-long-spelling): Wrap
ispell check in ignore-errors, as ispell-valid-dictionary-list can
signal an error.
* mouse.el (context-menu-online-search): Add new function
(eww-search-prefix): Declare variable from eww.el
(mouse-online-search-at-point): Add new command
* lisp/battery.el (battery-status-function): In Termux, neither
/sys/ or /proc/ are readable on phones that are not rooted. This
patch makes Emacs verify if they are readable before it attemps
reading them (bug#53026).
* lisp/progmodes/python.el (python-shell-send-string-no-output): Don't
let-bind comint-preoutput-filter-functions globally for all comint
processes. Modify the behaviour of only the current python
process (bug#53219).
Dmitry Gutov [Fri, 14 Jan 2022 02:30:16 +0000 (04:30 +0200)]
Steamline xref-query-replace-in-results
* lisp/progmodes/xref.el (xref-query-replace-in-results):
Steamline the most common scenario
(https://lists.gnu.org/archive/html/emacs-devel/2022-01/msg00864.html).
Eli Zaretskii [Thu, 13 Jan 2022 14:40:28 +0000 (16:40 +0200)]
Improve documentation of 'isearch-emoji-by-name'
* lisp/isearch.el (isearch-menu-bar-map, isearch-emoji-by-name):
Fix wording of documentation.
* etc/NEWS: Fix wording of the 'isearch-emoji-by-name' entry.
* doc/emacs/search.texi (Special Isearch): Fix wording of the
documentation of 'isearch-emoji-by-name'; move it out of the
enumeration that deals with non-ASCII characters in general.
Eli Zaretskii [Thu, 13 Jan 2022 14:18:50 +0000 (16:18 +0200)]
Fix frame-undeletion menu items
* lisp/menu-bar.el (menu-bar-file-menu): Fix wording of the new
menu items and their help-echo. Don't show "Undelete Frame"
in the menu unless there is a frame to undelete.
Gregory Heytings [Thu, 13 Jan 2022 08:31:43 +0000 (10:31 +0200)]
Undelete deleted frames.
* lisp/frame.el (undelete-frame): New command.
(undelete-frame--handle-delete-frame): New auxiliary function.
(undelete-frame--deleted-frames): New auxiliary variables.
(undelete-frame-mode): New minor mode.
(ctl-x-5-map): Bind the new command.
* etc/NEWS: Document the new command and minor mode.
* src/frame.c (Fdelete_frame): Update docstring, and mention the
minor mode.
* lisp/menu-bar.el (menu-bar-file-menu): Add an entry for the
new command.
* doc/emacs/frames.tex (Frame Commands): Document the new command
and minor mode.
Po Lu [Thu, 13 Jan 2022 01:32:14 +0000 (09:32 +0800)]
Use XI2 focus events on X toolkit builds
* src/xfns.c (setup_xi_event_mask): Set focus masks on both the
shell window and the frame window.
* src/xterm.c (x_detect_focus_change): Enable XI2 focus code on
Xt.
Eric Abrahamsen [Wed, 12 Jan 2022 22:58:46 +0000 (14:58 -0800)]
Rework setting/unsetting of gnus-registry-enabled
The basic idea is, we're moving the setting/unsetting of
`gnus-registry-enabled' so that it is a more reliable indicator of
whether the registry is actually available or not.
* lisp/gnus/gnus-registry.el (gnus-registry-load): Move the setting of
`gnus-registry-enabled' here, after we're sure the registry actually
has been loaded.
(gnus-registry-initialize): Move it out of here. All this function
does is conditionally call `gnus-registry-load'.
(gnus-registry-register-message-ids): Only check
`gnus-registry-enabled', since we'd more confident about this
now. Sort checks in order of increasing complexity.
(gnus-registry-clear): Unset `gnus-registry-enabled'.
(gnus-registry-install-hooks): This function should only install
hooks, not set variables.
(gnus-registry-unload-hook): Change the unload hook to call
`gnus-registry-clear', as that will do all the necessary
work (including calling `gnus-registry-unload-hook')
Daniel Martín [Wed, 12 Jan 2022 17:43:15 +0000 (19:43 +0200)]
Add isearch-emoji-by-name
* lisp/isearch.el (isearch-emoji-by-name): Add a new command to insert
Emoji characters into incremental search strings. (Bug#52605)
(isearch-mode-map): Bind it to 'C-x 8 e RET'.
(isearch-menu-bar-map): Add it to the menu bar.
* doc/emacs/search.texi (Special Isearch): Update the documentation to
mention the new command.
* etc/NEWS: And advertise it.
Fix closure-conversion of shadowed captured lambda-lifted vars
Lambda-lifted variables (ones passed explicitly to lambda-lifted
functions) that are also captured in an outer closure and shadowed
were renamed incorrectly (bug#51982).
Reported by Paul Pogonyshev.
* lisp/emacs-lisp/cconv.el (cconv--lifted-arg): New.
(cconv-convert): Provide correct definiens for the closed-over
variable.
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases):
* test/lisp/emacs-lisp/cconv-tests.el (cconv-tests--intern-all)
(cconv-closure-convert-remap-var): Add tests.
Jim Porter [Tue, 4 Jan 2022 20:58:38 +0000 (12:58 -0800)]
Follow POSIX/GNU argument conventions for 'eshell-eval-using-options'
* lisp/eshell/esh-opt.el (eshell--split-switch): New function.
(eshell-set-option): Allow setting a supplied value instead of always
consuming from 'eshell--args'.
(eshell--process-option): Support consuming option values specified as
a single token.
(eshell--process-args): For short options, pass full switch token to
'eshell--process-option'.
* test/lisp/eshell/esh-opt-tests.el (esh-opt-process-args-test): Fix
test.
(test-eshell-eval-using-options): Add tests for various types of
options.
* doc/misc/eshell.texi (Defining new built-in commands): New
subsection, describe how to use 'eshell-eval-using-options'.
Eli Zaretskii [Wed, 12 Jan 2022 14:52:14 +0000 (16:52 +0200)]
Avoid assertion violations with variable-weight fonts
* src/font.c (font_score, font_delete_unmatched): Don't assume
weight, slant, and width properties of the font must be fixnums:
some variable-weight fonts violate that assumption. Reported
by Sean Whitton <spwhitton@spwhitton.name>. This is for builds
with Fontconfig < v2.11.91, for which the fix in
'ftfont_pattern_entity' cannot work. (Bug#52888)
Don't fail flymake-tests if `gcc` actually is Clang
* test/lisp/progmodes/flymake-tests.el (flymake-tests--gcc-is-clang)
(different-diagnostic-types, included-c-header-files): Skip tests that
depend on the `gcc` command really being GCC and not Clang.
* lisp/gnus/gnus-art.el (gnus-treat-emphasize): Don't do emphasis
in text/html parts, because this leads to mis-filled text
(especially with *...* that's boldified, which typically becomes
much wider).