Po Lu [Mon, 17 Jan 2022 11:09:50 +0000 (11:09 +0000)]
Fix Emacs icon not appearing on Haiku
* lib-src/be_resources.cc (main): Scale input bitmap
appropriately before setting it as the mini and large icons.
* src/Makefile.in (Emacs): Add dependency on
`lib-src/be-resources'.
Po Lu [Mon, 17 Jan 2022 10:08:04 +0000 (10:08 +0000)]
Display override redirect frames in all workspaces on Haiku
* src/haiku_support.cc (class EmacsWindow): New field
`pre_override_redirect_workspaces'.
(BWindow_set_override_redirect): Set window to display on all
workspaces.
* lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist):
Use `tramp-sshfs-handle-set-file-times'.
(tramp-sshfs-handle-set-file-times): New defun.
Po Lu [Mon, 17 Jan 2022 04:52:00 +0000 (04:52 +0000)]
Really eliminate tooltip flicker on Haiku
* src/haikufns.c (tip_frame): Make non-static.
* src/haikuterm.c (haiku_read_socket): Ignore motion events that
didn't actually move when a tip frame is visible.
* src/haikuterm.h (tip_frame): Declare.
Juri Linkov [Sun, 16 Jan 2022 20:58:30 +0000 (22:58 +0200)]
Add undelete-frame-max instead of undelete-frame-mode (bug#51883)
* doc/emacs/frames.texi (Frame Commands): Replace
undelete-frame-mode with undelete-frame-max.
* lisp/frame.el (undelete-frame-max): New defcustom, by default 1.
(undelete-frame--handle-delete-frame): Use undelete-frame-max
instead of hard-coded 16.
(undelete-frame-mode): Remove function.
(after-init-hook): Add hook undelete-frame--handle-delete-frame to
delete-frame-functions using after-init-hook to not store the
initial frame.
(undelete-frame): Remove undelete-frame-mode. Use undelete-frame-max
instead of hard-coded 16.
* lisp/menu-bar.el (menu-bar-file-menu): Remove menu item undelete-frame-mode.
* src/frame.c (Fdelete_frame): Replace `undelete-frame-mode' with
`undelete-frame-max' in the docstring.
Matthias Meulien [Sun, 16 Jan 2022 18:13:21 +0000 (20:13 +0200)]
Extend Outline mode with default visibility state
* etc/NEWS: Announce support for default visibility state (bug#51809).
* lisp/outline.el (outline-mode, outline-minor-mode): Ensure default
visibility state is applied with outline-apply-default-state.
(outline-default-state, outline-default-rules)
(outline-default-long-line, outline-default-line-count): New defcustoms.
(outline-apply-default-state, outline-show-only-headings)
(outline--show-headings-up-to-level): New functions.
Po Lu [Sun, 16 Jan 2022 11:02:58 +0000 (11:02 +0000)]
Use kMenuWindowFeel on Haiku toolkip windows
* src/haiku_support.cc (BWindow_set_tooltip_decoration): Use
kMenuWindowFeel and set flags here.
* src/haikufns.c (Fx_show_tip): Don't set_avoid_focus manually
since setting tooltip decorations already does that.
Po Lu [Sun, 16 Jan 2022 10:12:22 +0000 (10:12 +0000)]
Reduce poll time for Haiku file dialogs
* src/haiku_support.c (be_popup_file_dialog): Reduce idle
processor load by increasing timeout. The timeout is still too
low to be noticable by the user.
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.