Glenn Morris [Mon, 23 Nov 2020 17:41:53 +0000 (09:41 -0800)]
Merge from origin/emacs-27
86cbc9d216 Make ignoring modifiers on IME input optional 32b97bb9e0 Ignore modifiers when processing WM_IME_CHAR messages f641ef1a07 Improve documentation of 'font-spec'
Alan Mackenzie [Mon, 23 Nov 2020 15:54:50 +0000 (15:54 +0000)]
minibuffer code: restore original frame after using minibuffer-only frame, etc
* src/minibuf.c (read_minibuf): In the record_unwind_protect for the second
restore_window_configuration (separate minibuffer frame case) arrange for the
future switching back to the original frame by Fset_window_configuration.
Eric Abrahamsen [Fri, 20 Nov 2020 00:32:41 +0000 (16:32 -0800)]
Small fixes to gnus-search output parsing of indexed engines
* lisp/gnus/gnus-search.el (gnus-search-indexed-parse-output): When
filtering for desired groups, accept any of [.\/] as potential segment
delimiters. Later on, filesystem path separators will be interpreted
as dots (".") when constructing group names. Also, make sure we use
`expand-file-name' on the prefix, and just use `string-remove-prefix'
to get rid of it.
Stefan Kangas [Sun, 22 Nov 2020 06:19:11 +0000 (07:19 +0100)]
Test for byte-compiler warning "variable lacks prefix"
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp--with-warning-test): New macro.
(bytecomp-warn-wrong-args, bytecomp-warn-wrong-args-subr):
Use above new macro.
(bytecomp-warn-variable-lacks-prefix): New test.
Stefan Kangas [Fri, 13 Nov 2020 18:15:21 +0000 (19:15 +0100)]
Say which command shadows a key binding
* src/keymap.c (describe_vector): Say which command shadows this
binding. (Bug#9293)
* test/src/keymap-tests.el
(help--describe-vector/bug-9293-one-shadowed-in-range): Adapt
test.
Stefan Kangas [Fri, 13 Nov 2020 14:28:34 +0000 (15:28 +0100)]
Don't shadow bindings by the same command
* src/keymap.c (describe_vector): Do not say binding is shadowed if
the other key binding points to the same command. (Bug#9293)
* test/src/keymap-tests.el
(help--describe-vector/bug-9293-same-command-does-not-shadow): New
test.
Stefan Kangas [Fri, 13 Nov 2020 14:28:29 +0000 (15:28 +0100)]
Don't show key ranges if shadowed by different commands
* src/keymap.c (describe_vector): Make sure found consecutive keys
are either not shadowed or, if they are, that they are shadowed by
the same command. (Bug#9293)
* test/src/keymap-tests.el
(help--describe-vector/bug-9293-one-shadowed-in-range): New test.
Juri Linkov [Sat, 21 Nov 2020 19:49:46 +0000 (21:49 +0200)]
Handle help-form in y-or-n-p and use this in find-file-noselect (bug#5423)
* doc/lispref/help.texi (Help Functions): Mention help-form for
read-char-from-minibuffer and y-or-n-p.
* doc/lispref/minibuf.texi (Yes-or-No Queries): Mention help-form
for y-or-n-p.
(Multiple Queries): Mention help-form for read-char-from-minibuffer.
* lisp/files.el (find-file-noselect): Let-bind multi-line help text
to help-form for y-or-n-p.
* lisp/subr.el (read-char-choice): Mention help-form in docstring.
(read-char-from-minibuffer): Mention help-form in docstring.
(y-or-n-p-map): Remove handling of 'help'.
(y-or-n-p): Mention help-form in docstring.
When help-form is non-nil: add help-char to 'prompt', and bind
help-char to help-form-show in composed-keymap.
Michael Albinus [Sat, 21 Nov 2020 14:28:52 +0000 (15:28 +0100)]
Handle connection-local null-device and path-separator variables
* doc/lispref/os.texi (System Environment): Add `path-separator'
function and `null-device' variable and function.
* etc/NEWS: Mention 'null-device' and 'path-separator'. Fix typos.
* lisp/files-x.el (path-separator, null-device): New defuns. (Bug#3736)
* lisp/net/tramp-adb.el
(tramp-adb-connection-local-default-shell-variables): Rename from
`tramp-adb-connection-local-default-profile'.
* lisp/net/tramp-integration.el
(tramp-connection-local-default-system-variables): New defvar.
Add it to connection-local profiles.
(tramp-connection-local-default-shell-variables): Rename from
`tramp-connection-local-default-profile'.
* lisp/progmodes/grep.el (grep-hello-file): New defun.
(grep-compute-defaults): Use `null-device' function for remote
case. Handle remote `hello-file'. Use `process-file-shell-command'.
(grep,grep-expand-keywords, lgrep): Use `null-device' function for
remote case.
Eli Zaretskii [Sat, 21 Nov 2020 08:14:55 +0000 (10:14 +0200)]
Make ignoring modifiers on IME input optional
By default, ignore modifier keys on IME input, but add
a variable to get back old behavior.
* src/w32fns.c (syms_of_w32fns): New variable
w32-ignore-modifiers-on-IME-input.
(w32_wnd_proc): Use it to ignore modifier keys when IME input is
used. (Bug#44641)
* etc/NEWS: Announce the change and the new variable.
Mauro Aranda [Fri, 20 Nov 2020 22:28:03 +0000 (19:28 -0300)]
Use cl-letf instead of unwind-protect in a test
* test/lisp/cus-edit-tests.el (cus-edit-tests-customize-saved/show-obsolete):
Good use case for cl-letf, so use it.
Suggested by Stefan Monnier <monnier@iro.umontreal.ca> in:
https://lists.gnu.org/archive/html/emacs-devel/2020-11/msg00914.html
Mauro Aranda [Fri, 20 Nov 2020 21:37:30 +0000 (18:37 -0300)]
Take care of a FIXME in cus-edit-tests.el
* test/lisp/cus-edit-tests.el (cus-edit-tests-customize-saved/show-obsolete):
Add a fake saved-value property, to be able check that the obsolete
option is present in the Customize buffer. Expect the test to pass
now.
Eli Zaretskii [Fri, 20 Nov 2020 15:00:36 +0000 (17:00 +0200)]
Fix compilation on MS-Windows with librsvg > 2.46.0
* src/image.c (rsvg_handle_get_dimensions, init_svg_functions):
Make 'rsvg_handle_get_dimensions' available and defined for all
versions of librsvg. (Bug#44655)
Stefan Monnier [Thu, 19 Nov 2020 22:13:04 +0000 (17:13 -0500)]
* src/data.c (set_internal): Fix bug#44733
Set the default value when `set` encounters a PER_BUFFER variable
which has been let-bound globally, to match the behavior seen with
`make-variable-buffer-local`.
* test/src/data-tests.el (binding-test--let-buffer-local):
Add corresponding test.
(data-tests--set-default-per-buffer): Add tentative test for the
performance problem encountered in bug#41029.
Stefan Kangas [Thu, 19 Nov 2020 16:41:18 +0000 (17:41 +0100)]
Remove some compat code from url.el
* lisp/url/url.el (url-warn): Make into obsolete alias for
display-warning.
* lisp/url/url-auth.el (url-register-auth-scheme):
* lisp/url/url-news.el (url-news-open-host):
* lisp/url/url-proxy.el (url-find-proxy-for-url): Adjust callers.
All-ASCII strings cannot have substrings with non-ASCII characters in
them; use this fact to avoid searching entirely.
* src/fns.c (Fstring_search): For multibyte non-ASCII needle and
unibyte haystack, don't check if the haystack is all-ASCII; it's a
waste of time. For multibyte non-ASCII needle and multibyte
all-ASCII haystack, fail immediately.
* test/src/fns-tests.el (string-search): Add more test cases.
Alan Mackenzie [Thu, 19 Nov 2020 10:31:50 +0000 (10:31 +0000)]
In attempted recursive minibuffer use, display error message in correct frame
This was problematic when minibuffer-follows-selected-frame was non-nil.
Introduce a new parameter DONT-SET-FRAME to set-window-configuration.
* doc/lispref/windows.texi (Window Configurations): Describe the new &optional
parameter to set-window-configuration.
* etc/NEWS (Lisp Changes): Note the new parameter to set-window-configuration.
* src/keyboard.c (read_char_help_form_unwind): Add a new Qnil argument to the
call of Fset_window_configuration.
* src/minibuf.c (read_minibuf): Cons up a Qt with the window configuration in
the argument to record_unwind_protect for the window configuration (twice).
* src/window.c (Fset_window_configuration): Add the new &optional parameter
and document it in the doc string. At the final do_switch_frame operation,
restore the original frame when DONT-SET-FRAME is non-nil.
(restore_window_configuration): Handle the new parameter when the supplied
argument is a cons.
Stefan Kangas [Thu, 19 Nov 2020 05:12:25 +0000 (06:12 +0100)]
Add new variable cperl-tags-file-name
* lisp/progmodes/cperl-mode.el (cperl-tags-file-name): New variable.
(cperl-write-tags): Use above new variable instead of hardcoding
filename "TAGS". (Bug#8802)
This avoids unnecessary body duplication in expansion and macro
recursion (causing macro-expansions at runtime), making it clearer
what is going on.
* lisp/progmodes/gdb-mi.el (gdb-wait-for-pending): Make it a function,
remove lambda quoting, η-reduce and simplify.
(gdb-thread-exited, gdb-thread-selected): Adapt callers.
The :local tag does not currently work as intended (it results in a
default value of bibtex-unify-case-convert of nil rather than
identity), and no other bibtex.el user option is automatically
buffer-local, so revert this recent change.
For discussion, see the following emacs-devel thread:
https://lists.gnu.org/r/emacs-devel/2020-11/msg00734.html
* lisp/textmodes/bibtex.el (bibtex-unify-case-convert): Don't make
automatically buffer-local for consistency with other user options,
and because the :local tag doesn't have the intended results.
Michael Albinus [Wed, 18 Nov 2020 10:32:38 +0000 (11:32 +0100)]
Preserve `dired-filename' text properties in Tramp
* lisp/net/tramp-sh.el (tramp-sh-handle-insert-directory):
Restore `dired-filename' text property, which has been destroyed
by `decode-coding-region'. (Bug#44682)
Alan Mackenzie [Tue, 17 Nov 2020 16:51:49 +0000 (16:51 +0000)]
Enhance syntax-tests.el to test nestable comments (Lisp style)
Also add some tests for braces and parse-partial-sexp amongst Lisp style
comments.
* test/src/syntax-tests.el (\;-in, \;-out): Add syntax for { and }.
(top-level): Add new tests for Lisp style comments.
(\#|-in, \#|-out): New functions.
(top-level): Add new tests for nested Lisp style comments, and mixtures of
nested comments with "ordinary" comments.
* test/src/syntax-resources/syntax-comments.txt (top-level): Add new test
fragments for #|...|#, etc.
Stefan Kangas [Tue, 17 Nov 2020 11:13:13 +0000 (12:13 +0100)]
Add command to filter package menu by name or description
* lisp/emacs-lisp/package.el (package-menu-filter-by-description):
(package-menu-filter-by-name-or-description): New commands to filter
the package menu. (Bug#44699)
(package-menu-mode-map): Bind the above new commands.
(package-menu-mode-menu): Add new commands to the menu.
* doc/emacs/package.texi (Package Menu): Document new commands.
Ruthra Kumar [Mon, 16 Nov 2020 22:04:36 +0000 (23:04 +0100)]
Use 'eshell-find-alias-function' instead of fboundp
* lisp/eshell/esh-cmd.el (eshell-invoke-directly): Fix problem
with (require 'em-tramp) making password prompting from "sudo
bash" no longer work (bug#43772).
Glenn Morris [Mon, 16 Nov 2020 17:43:40 +0000 (09:43 -0800)]
; * INSTALL: Correct a recent change.
Debian stopped including the major version number in the emacs package
name after version 25, so there is no 'emacs27-dbg' package.
We may as well drop this clause altogether, since Debian stable has
version 26.
No need to merge to master (where this information is in etc/PROBLEMS
in any case).
Glenn Morris [Mon, 16 Nov 2020 17:05:31 +0000 (09:05 -0800)]
Merge from origin/emacs-27
75723ec212 (origin/emacs-27) ; * lisp/emacs-lisp/benchmark.el (benchm... 53e2a612ad ; * lib-src/make-fingerprint.c: Update commentary. 286c632772 Reformat argument commentary in etags.c 4ec740866a Make the invocation of combine-change-calls in comment-reg... 66bcec8838 * lisp/progmodes/cc-langs.el (c-<>-notable-chars-re): Fix ... 03eeab469e ; Update the expected result files in test/manual/etags. d875a22bc6 Update the various INSTALL files
Glenn Morris [Mon, 16 Nov 2020 16:59:47 +0000 (08:59 -0800)]
Merge from origin/emacs-27
19da602991 Fix input method translation near read-only text 5aabf2cc7f Fix display of truncated R2L lines on TTY frames daff3bda10 Avoid crashes when a reversed glyph row starts with a comp... b697bb91a1 ; * .gitignore: src/fingerprint.c not generated since 2019...
Juri Linkov [Sun, 15 Nov 2020 20:32:39 +0000 (22:32 +0200)]
New user options 'copy-region-blink-delay' and 'delete-pair-blink-delay'
* lisp/emacs-lisp/lisp.el (delete-pair-blink-delay): New defcustom.
(delete-pair): Use it. (Bug#4136)
* lisp/simple.el (copy-region-blink-delay): New defcustom.
(indicate-copied-region): Use it. (Bug#42865)
Thanks to Sean Whitton <spwhitton@spwhitton.name>.
(indicate-copied-region): Use 'query-replace-descr' not to show
newlines literally. Use "Copied text" instead of misleading
"Saved text" (bug#42865).
* lisp/progmodes/compile.el (compilation-error-regexp-alist-alist):
The comments above the regexp for the 'gnu' rule contained
references to the previous string regexp, which has been difficult
to follow ever since the translation to rx. Move the comments
to their proper places, and add some guiding notes.
Alan Mackenzie [Sun, 15 Nov 2020 13:23:15 +0000 (13:23 +0000)]
Make the invocation of combine-change-calls in comment-region valid
This fixes bug #44581. The problem was that whitespace outside of the (BEG
END) region was being deleted, and this made the invocation of
combine-change-calls with (BEG END) invalid.
* lisp/newcomment.el (comment-region-default): Amend the second argument to
combine-change-calls.
Stefan Kangas [Sun, 15 Nov 2020 01:41:36 +0000 (02:41 +0100)]
Make initial frame match frame-title-format
* src/xterm.c (x_term_init):
* src/w32term.c (w32_initialize_display_info): Sync initial frame
title with new value of Vframe_title_format.
Problem reported by Angelo Graziosi <angelo.g0@libero.it>.
Stefan Kangas [Sat, 14 Nov 2020 23:53:32 +0000 (00:53 +0100)]
Run menu-item :filter function before showing binding
* lisp/help.el (describe-map): Fix running `menu-item' :filter
functions. This fixes a mistake in the previous conversion of this
defun from the old C function describe_map. See the discussion in
Bug#39149.
* test/src/keymap-tests.el
(keymap---get-keyelt/runs-menu-item-filter)
(describe-buffer-bindings/menu-item-filter-show-binding)
(describe-buffer-bindings/menu-item-filter-hide-binding):
New tests.
(keymap-tests--test-menu-item-filter): New defun.