Jeff Walsh [Wed, 12 May 2021 11:27:59 +0000 (21:27 +1000)]
* src/pgtkterm.c remove duplicated code
* src/pgtkterm.c (pgtk_update_window_begin):
(pgtk_update_window_end):
(pgtk_redisplay_interface): Remove duplicate code and default to the
generic gui_update_window_begin/end implementations
Yuuki Harano [Sun, 9 May 2021 08:53:20 +0000 (17:53 +0900)]
Fix pgtk_make_frame_visible doesn't work
* src/pgtkterm.c (pgtk_wait_for_map_event): New function to wait for
map events. The content is moved from pgtk_make_frame_visible.
(pgtk_make_frame_visible): Call pgtk_wait_for_map_event, instead of
process here directly.
(pgtk_make_frame_invisible): Call pgtk_wait_for_map_event to wait
for multiple map events.
Yuuki Harano [Tue, 4 May 2021 16:21:02 +0000 (01:21 +0900)]
Entrust Gtk with handling tooltips
Previously, tooltips for menu items are below the menu.
To solve it, set tooltip text on menu items in advance, and entrust
gtk with handling tooltips.
* src/gtkutil.c (xg_show_tooltip): New function for pgtk to set
tooltip text on the widget.
(xg_hide_tooltip): New function for pgtk to clear tooltip text on the
widget.
(xg_create_frame_widgets): Don't set initial tooltips text, and don't
use qttip_cb.
(xg_create_frame_outer_widgets): Ditto.
(make_menu_item): Set tooltip text on the menu item.
* src/gtkutil.h: New declaration of xg_show_tooltip for pgtk.
* src/pgtkfns.c (Fx_show_tip): Calls xg_show_tooltip, and always ok.
Make (setf (map-elt ...)) return the value in the alist/plist cases
* lisp/emacs-lisp/map.el (map-elt): Return the value in the list
case (which can signal a `map-not-inplace' error.
(map-elt): Return the value in the list case, too (bug#47572).
Alan Mackenzie [Thu, 6 May 2021 10:48:14 +0000 (10:48 +0000)]
Fix wrong handling of minibuffers when frames get iconified/made invisible
This should fix bug #47766.
* lisp/window.el (window-deletable-p): Add a quote where it was missing from
minibuffer-follows-selected-frame.
* src/frame.c (check_minibuf_window): Delete the function.
(delete_frame): In place of calling check_minibuf_window, call
move_minibuffers_onto_frame, possibly to move minibuffers onto the new current
frame.
(Fmake_frame_invisible, Ficonify_frame): Remove calls to check_minibuf_window.
* src/minibuf.c (Factive_minibuffer_window): Search the frames for the active
minibuffer rather than just assuming minibuf_window has been correctly
updated.
Harald Jörg [Thu, 6 May 2021 10:33:40 +0000 (12:33 +0200)]
cperl-mode: Eliminate bad interpretation of ?foo?
* lisp/progmodes/cperl-mode.el (cperl-find-pods-heres): Delete
?? from the allowed bare regexp delimiters.
(cperl-short-docs): Delete ?...? from the documentation.
* test/lisp/progmodes/cperl-mode-tests.el (cperl-bug-47598):
Add tests for good, bad, and ambiguous use of ? as regex
delimiter (bug#47598).
Only look at the headers when computing the envelope from address
* lisp/mail/smtpmail.el (smtpmail-send-it)
(smtpmail-send-queued-mail, smtpmail-via-smtp):
* lisp/mail/sendmail.el (sendmail-send-it): Only look at the
headers when computing the envelope from (bug#47616).
Dmitrii Kuragin [Thu, 6 May 2021 09:45:06 +0000 (11:45 +0200)]
Fix ispell program comparison
* lisp/textmodes/ispell.el (ispell-set-spellchecker-params):
Compare strings with `equal', not `eq' (since the identity of the
string may change) (bug#48246).
Daniel Martín [Thu, 6 May 2021 08:27:03 +0000 (10:27 +0200)]
Add a help option to the open large files prompt
* lisp/files.el (files--ask-user-about-large-file-help-text): New
function that returns information about opening large files in
Emacs. (Bug#45412)
(files--ask-user-about-large-file): Use read-multiple-choice to
display the available actions.
* etc/NEWS: Advertise the new feature.
Daniel Martín [Thu, 6 May 2021 08:21:59 +0000 (10:21 +0200)]
Extend read-multiple-choice to support free-form help descriptions
* lisp/emacs-lisp/rmc.el (read-multiple-choice): Add a new argument to
override the default help description in `read-multiple-choice'. Use
the `help-char' variable instead of ?\C-h. Also support the `edit'
action from `query-replace-map', so that help links can be visited by
entering a recursive edit.
Karl Fogel [Wed, 5 May 2021 21:40:52 +0000 (16:40 -0500)]
New option to confirm deletion in bookmark menu
* lisp/bookmark.el (bookmark-menu-confirm-deletion): New defcustom.
(bookmark-delete-all): Add comment explaining why we don't use the new
confirmation formula here.
(bookmark-bmenu-execute-deletions): Conditionally confirm deletion.
Note that the bulk of the code diff here is just reindentation of an
otherwise unchanged `let' expression.
* etc/NEWS: Announce the new option.
Thanks to Lars Ingebrigtsen and Eli Zaretskii for review, and thanks
to Oliver Taylor for suggesting the option in the first place:
https://lists.gnu.org/archive/html/emacs-humanities/2021-02/msg00022.html
From: Oliver Taylor
Subject: Re: [emacs-humanities] Extending Emacs Bookmarks to Work with EWW
To: Karl Fogel Cc: Stefan Kangas, Emacs-humanities mailing list
Date: Wed, 3 Feb 2021 20:21:59 -0800
Message-Id: <936D47EA-4D11-452B-8303-971B6386877B@me.com>
Boruch Baum [Wed, 5 May 2021 13:05:50 +0000 (15:05 +0200)]
Fix error in ses.el when setting the current row
* lisp/ses.el (ses-jump, ses-list-local-printers)
(ses-list-named-cells): Use `user-error' for user errors.
(ses-set-header-row): Function `ses-set-header-row' was
determining the current row based upon variable `ses--curcell',
but that variable is NIL until one begins an operation on a cell
(eg. keybindings '=', '"'), so navigating to a row was
insufficient to select that row, and further generated an ERROR
because the code was not expecting a NIL value for variable
`ses--curcell' (bug#47784).
Martin Rudalics [Wed, 5 May 2021 08:26:32 +0000 (10:26 +0200)]
Fix two GTK3 event handling issues
* src/xterm.c (handle_one_xevent): For GTK3 PropertyNotify and
MapNotify events explicitly request the stored frame sizes when
the frame changes from iconified to a non-hidden state
(Bug#24526). For Expose events do not change the frame's
visibility or iconified state. For FocusIn events on GTK3 do
not apply the fix for Bug#42655. The latter two changes are to
avoid that plain invisible frames get reported as iconified.
Eric Abrahamsen [Mon, 3 May 2021 16:14:24 +0000 (09:14 -0700)]
Add new defvoo nnimap-keepalive-intervals to Gnus nnimap servers
* lisp/gnus/nnimap.el (nnimap-keepalive-intervals): New per-server
config for customizing when keepalive commands are sent.
(nnimap-keepalive, nnimap-open-connection-1): Consult in these
places. Additionally, use nnimap-streaming -> t when sending the
keepalive NOOP, so we don't wait for the response.
* doc/misc/gnus.texi (Customizing the IMAP Connection): Document.
Eli Zaretskii [Tue, 4 May 2021 17:37:33 +0000 (20:37 +0300)]
Fix infloop in lsp-mode
* src/indent.c (line_number_display_width): Make sure the selected
window's buffer is current before using display code on it:
redisplay assumes that the window's buffer is current at all
times. Reported by Evgeny Kurnevsky via lsp-mode's issue 1621,
https://github.com/emacs-lsp/lsp-mode/issues/1621.
Glenn Morris [Tue, 4 May 2021 14:50:28 +0000 (07:50 -0700)]
; Merge from origin/emacs-27
The following commits were skipped:
6a46d3d809 (emacs-27) ; Auto-commit of loaddefs files. ccfd2e20a9 Fix GUD overlay arrows in M-x gdb when debugging over Tram... e61688f87d Fix setting breakpoints in M-x gdb for remote files. Don'...
Its only use was removed in the recent change of 2021-04-27 "Major
rewrite of adjust_frame_size", announced in the following thread:
https://lists.gnu.org/r/emacs-devel/2021-04/msg01162.html
Fix inconsistent behaviour in find-file-noselect when using nowarn
* lisp/files.el (after-find-file): Behave the same in when
warning/not warning (bug#47850). This fixes this test case:
(switch-to-buffer (find-file-noselect "non-existing-dir/test.el" t))
which would leave the buffer read-only.
Boruch Baum [Tue, 4 May 2021 08:58:52 +0000 (10:58 +0200)]
Fontify lines when setting a bookmark
* lisp/bookmark.el (bookmark-fontify): New user option (bug#48179).
(bookmark-face): New face.
(bookmark--fontify, bookmark--unfontify): New functions.
(bookmark-set-internal, bookmark--jump-via, bookmark-delete): Use
them.
Martin Rudalics [Tue, 4 May 2021 07:17:11 +0000 (09:17 +0200)]
Fix a problem with x_set_tab_bar_lines (Bug#46827)
* src/xfns.c (x_set_tab_bar_lines): Call
x_change_tab_bar_height only if the number of tab bar lines
changed from or to zero (Bug#46827).
* src/xterm.c (x_make_frame_visible): Make frame_size_history
update less noisy by doing it only if the frame wasn't visible
before.
* lisp/image.el (image-show-frame): Don't force an update if the
buffer with the animation isn't in a window (bug#47895). Also
just update the window in question.
* lisp/image.el (image-animate): Only compute the animation data
once -- this avoids recomputing the image on every iteration when
the image is not displayed (bug#47895).
Steve Purcell [Mon, 3 May 2021 07:41:44 +0000 (09:41 +0200)]
ruby-mode.el: puts and printf do not require args
* lisp/progmodes/ruby-mode.el (ruby-font-lock-keywords): puts and
printf can be called without arguments, so the font locking of
"bare" calls to either is incorrect. The fix is to font-lock them
as for other kernel methods which accepts zero or more arguments
(bug#48180).
Lele Gaifax [Mon, 3 May 2021 07:37:38 +0000 (09:37 +0200)]
Align TUTORIAL.it to the English version
* etc/tutorials/TUTORIAL.it: Reference 'describe-command' to replicate
recent change. Add also a space before '<Invio>' in several places,
mimicking the usage of <Return> in the English version (bug#48183).
Stefan Kangas [Sun, 2 May 2021 13:04:00 +0000 (15:04 +0200)]
Add new help command 'describe-command'
* lisp/help-fns.el (describe-command): New command.
(help-fns--describe-function-or-command-prompt): New helper
function to prompt for a function or function. (Bug#46627)
(describe-function): Use above new helper function.
* lisp/help.el (help-map): Bind above new command to `C-h x'.
(help-for-help): Add this new command to the help summary.
* lisp/menu-bar.el (menu-bar-describe-menu): Add the new command to
the help menu.
* doc/emacs/help.texi (Help Summary, Name Help): Document
'describe-command', and update documentation on 'describe-function'.
* etc/tutorials/TUTORIAL: Change reference from 'describe-function' to
'describe-command'.
Alan Third [Sun, 2 May 2021 10:25:40 +0000 (11:25 +0100)]
Fix crash when resizing GNUstep builds
The toolkit can send far too many resize notifications, so be more
careful when we take action after receiving one.
* src/nsfns.m (ns_set_tool_bar_lines): Remove unneeded NSTRACE.
* src/nsterm.m ([EmacsView viewDidResize:]): Don't report resizes to
Emacs when the same change has already been reported and delayed.
Martin Rudalics [Sun, 2 May 2021 08:33:22 +0000 (10:33 +0200)]
Make adjust_frame_size set up frame's new_width/_height too (Bug#17120)
The purpose of this change is to have implied frame size changes
pick up sizes requested by previous explicit size changes not
only after they have been confirmed by the WM but already when
they are initially passed to adjust_frame_size (Bug#17120).
* src/dispextern.h (delayed_size_change): Remove extern.
* src/dispnew.c (delayed_size_change): Make static again.
(do_pending_window_change): Call change_frame_size only if F's
new_size_p flag is set.
(change_frame_size_1): Set/reset F's new_size_p flag
* src/frame.c (adjust_frame_size): Remove extra
inhibit_horizontal/_vertical checks. Improve the implied
resizes check with INHIBIT equals 2. Set F's new_width and
new_height and reset F's new_size_p flag when we run
set_window_size_hook with INHIBIT 0 or 1.
* src/frame.h (struct frame): New bit slot new_size_p.
* src/gtkutil.c (xg_frame_resized): Use F's new_size_p flag
instead of delayed_size_change to decide whether to call
change_frame_size.
(xg_frame_set_char_size): Call frame_size_history_extra before
waiting for the ConfigureNotify event.
* src/xterm.c (handle_one_xevent): Use F's new_size_p flag
instead of delayed_size_change to decide whether to call
change_frame_size.
Boruch Baum [Sun, 2 May 2021 08:22:21 +0000 (10:22 +0200)]
Suppress false positives in apropos-value
* lisp/apropos.el (apropos-value): Skip more apropos-internal
variables (bug#48063).
(apropos-value-internal): Skip the first value in the history
values, which always contains the match.
Set `minibuffer-completion-*` variables buffer-locally instead of using
a global let-binding. This should also help make completion work
correctly when multiple minibuffers are simultaneously active.
Eli Zaretskii [Fri, 30 Apr 2021 11:22:29 +0000 (14:22 +0300)]
Fix the unexec build on MS-Windows
* src/buffer.c (init_buffer) [USE_MMAP_FOR_BUFFERS]: If dumped
with unexec, be sure to map new memory also for the " prin1"
buffer. For the reasons and discussion, see
https://lists.gnu.org/archive/html/emacs-devel/2021-04/msg01401.html.
Eli Zaretskii [Fri, 30 Apr 2021 07:28:50 +0000 (10:28 +0300)]
Improve support for 'display-line-numbers-width-start'
* lisp/display-line-numbers.el (display-line-numbers-width-start):
Allow the value to be a number. (Bug#48095)
(display-line-numbers-mode): Handle
'display-line-numbers-width-start' whose value is a number.