Juri Linkov [Sat, 15 Jan 2022 18:33:45 +0000 (20:33 +0200)]
More fixes for recently committed context-menu additions from bug#52973
* lisp/hi-lock.el (highlight-symbol-at-mouse): New defalias.
(hi-lock-face-symbol-at-mouse): Rename from hi-lock-symbol-at-mouse.
(hi-lock-context-menu): Use thing-at-mouse and middle-separator.
* lisp/man.el (Man-context-menu): Fix Man-at-mouse and use middle-separator.
* lisp/mouse.el (context-menu-functions): Remove context-menu-online-search.
Add occur-context-menu and dictionary-context-menu (bug#50552).
Tassilo Horn [Sat, 15 Jan 2022 10:23:46 +0000 (11:23 +0100)]
mailcap: Docfix & handle function-viewer case in mailcap-view-file
* lisp/net/mailcap.el (mailcap-mime-data): Fix docstring: if viewer is
a symbol/function, it should have zero args and expect the file's
contents to be in the current buffer.
(mailcap-view-file): Implement the case where the chosen viewer is a
function and not a shell command.
Po Lu [Sat, 15 Jan 2022 10:18:34 +0000 (18:18 +0800)]
Prevent pre-edit overlay text from being displayed after a command
This works around buggy input methods causing the overlay to be
displayed alongside newly inserted text for a brief period.
* lisp/term/x-win.el (x-clear-preedit-text): New function.
(x-preedit-text): Add said function to pre-command-hook. It
will remove itself when triggered.
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.