* doc/lispref/variables.texi (File Local Variables): Document
`permanently-enabled-local-variables'.
* lisp/files.el (enable-local-variables): Mention the new variable.
(set-auto-mode): Always call `hack-local-variables'.
(hack-local-variables): Factor out the variable gathering into its
own function, and respect the new variable (bug#47843).
(hack-local-variables--find-variables): Factored out from
`hack-local-variables'.
(permanently-enabled-local-variables): New variable.
This reverts commit 3d276324edd90b2df9f0987f635ca0c39037a81d
2021-05-09 "; Fix decoded-time-set-defaults typo in NEWS.27."
which was mistakenly applied to etc/NEWS.27 on the master branch.
It is replaced by commit c233f4eccddf09e41441b2a292491b469fd61792
2021-05-09 "; * etc/NEWS: Fix decoded-time-set-defaults typo."
on the emacs-27 branch (bug#48298).
Michael Albinus [Sun, 9 May 2021 13:37:37 +0000 (15:37 +0200)]
Cleanups for Tramp out-of-band methods on MS Windows
* doc/misc/tramp.texi (Frequently Asked Questions):
tramp-use-ssh-controlmaster-options is nil on MS Windows.
* lisp/net/tramp.el (tramp-unquote-shell-quote-argument): Revert previous
change, it worked (not as expected but) properly.
* test/lisp/net/tramp-tests.el (tramp-test17-dired-with-wildcards):
Don't skip on MS Windows.
(tramp--test-windows-nt-and-scp-p): Remove.
(tramp--test-special-characters): Skip for out-of-band methods on
MS Windows, sometimes.
* lisp/calendar/time-date.el (decoded-time-set-defaults): Set an
unspecified year field to 1970, as promised in the docstring, and to
ensure it's representable on all systems (bug#48298).
Reintroduce autoloads for edebug-all-defs/edebug-all-forms
* lisp/emacs-lisp/edebug.el (edebug-all-defs, edebug-all-forms):
Reintroduce ;;;###autoload of these user options that were removed
in bae2cfe63c, because this leads to errors in a common (and
recommended) use case (bug#47516).
Alan Mackenzie [Sat, 8 May 2021 12:10:00 +0000 (12:10 +0000)]
Prevent the selected window being a dead mini-window when switching frames
This fixes bug #48249 and also a situation where, with recursive minibuffers
enabled and minibuffer-follows-selected-frame t, switching frames when a
minibuffer was open would leave the mini-window selected on the old frame.
* lisp/window.el (record-window-buffer): Add extra parameter DO-MINIBUF, and
amend the code such that minibuffers only get processed when that parameter is
non-nil.
* src/minibuf.c (zip_minibuffer_stacks, read_minibuf): Call
Qrecord_window_buffer with the new argument set to Qt.
(move_minibuffers_onto_frame): Set the selected window on the old frame when
this would otherwise remain the mini-window.
Jim Porter [Mon, 3 May 2021 15:24:01 +0000 (08:24 -0700)]
Ensure `<menu-bar> <edit> <clear>' handles rectangular regions
* lisp/delsel.el (delete-active-region): Autoload it and make it interactive.
* lisp/menu-bar.el (menu-bar-edit-menu): Bind "Clear" to
`delete-active-region'.
Don't use symbolic links in the test resource directory.
This doesn't work on Windows. Instead, use the EMACS_TEST_DIRECTORY
environment variable to find the BPF files.
* test/src/emacs-tests.el (emacs-tests--lib-src): New constant.
(emacs-tests/seccomp/allows-stdout)
(emacs-tests/seccomp/forbids-subprocess)
(emacs-tests/bwrap/allows-stdout): Use it.
Dmitry Gutov [Thu, 6 May 2021 17:43:02 +0000 (20:43 +0300)]
project--buffer-list: Tighten the check
* lisp/progmodes/project.el (project--buffer-list): Tighten the
check to speed up in the presence of multiple Tramp sessions, too.
(https://lists.gnu.org/archive/html/emacs-devel/2021-05/msg00152.html)
Michael Albinus [Thu, 6 May 2021 15:15:30 +0000 (17:15 +0200)]
In Tramp, use scp "-T" argument if available
* lisp/net/tramp-sh.el (tramp-scp-strict-file-name-checking): New defvar.
(tramp-scp-strict-file-name-checking): New defun.
(tramp-do-copy-or-rename-file-out-of-band): Use it.
(tramp-methods) <scp, scpx>: Use "%x".
(tramp-make-copy-program-file-name): Use local quoting.
(tramp-sh-handle-make-process): Don't call
`tramp-maybe-open-connection', this happens implicitly by
`tramp-send-command'.
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.