Po Lu [Sun, 16 Jan 2022 05:57:14 +0000 (05:57 +0000)]
Avoid focus and allow monospace text in tooltip frames on Haiku
* src/haikufns.c (Fx_show_tip): Set avoid focus on tooltip
frames.
* src/haikuterm.c (haiku_default_font_parameter): Don't special
case the default font on tooltip frames, since the bug that was
supposed to work around has already been fixed.
Po Lu [Sun, 16 Jan 2022 00:47:41 +0000 (00:47 +0000)]
Fix a minor snafu when resizing frames on Haiku
* src/haiku_support.cc (BWindow_resize): Adjust for minor snafu
where BWindow::ResizeTo uses BRect-style width and height
instead of actual width and height.
Tassilo Horn [Sat, 15 Jan 2022 22:59:20 +0000 (23:59 +0100)]
Add some more mailcap tests.
* test/lisp/net/mailcap-resources/mailcap: New file.
* test/lisp/net/mailcap-resources/test.test: New file.
* test/lisp/net/mailcap-tests.el (with-pristine-mailcap): New macro.
(mailcap-parsing-and-mailcap-mime-info): New test for parsing mailcap
files and selecting the right viewer.
(mailcap--test-result): New variable.
(mailcap--test-viewer): New function.
(mailcap-view-file): New test for mailcap-view-file.
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.