Eli Zaretskii [Sat, 14 Nov 2020 13:02:13 +0000 (15:02 +0200)]
Make Calc windows dedicated by default
* lisp/calc/calc.el (calc-make-windows-dedicated): New defcustom.
(calc, calc-trail-display): Set Calc windows dedicated if
calc-make-windows-dedicated is non-nil. Patch by Boruch Baum
<boruch_baum@gmx.com>. (Bug#44108)
Eli Zaretskii [Sat, 14 Nov 2020 12:43:42 +0000 (14:43 +0200)]
Make 'prefer-utf-8' heed inhibit-*-detection variables
* lisp/international/mule-conf.el (prefer-utf-8): Inhibit
detection of null bytes and ISO escape sequences if the respective
inhibit-*-detection variables say so. (Bug#44486)
Jared Finder [Sun, 1 Nov 2020 05:25:47 +0000 (21:25 -0800)]
Face-changing text properties and help-echo now work with xterm-mouse.
* src/dispnew.c (update_mouse_position): New function for mouse
movement logic in 'handle_one_term_event' that can be shared across
different mouse backends.
(display--update-for-mouse-movement): New lisp function, call it.
* lisp/xt-mouse.el (xterm-mouse--handle-mouse-movement): New function
that calls 'display--update-for-mouse-movement'.
(xterm-mouse-translate-1): Call it.
* src/term.c (handle_one_term_event): Inline logic from
'term_mouse_movement' and call 'update_mouse_position'.
(term_mouse_movement): Delete.
Eric Abrahamsen [Wed, 11 Nov 2020 18:48:37 +0000 (10:48 -0800)]
Save instantiated gnus-search engines in an alist
So we aren't re-instantiating (and potentially configuring) them with
every search.
* lisp/gnus/gnus-search.el (gnus-search-engine-instance-alist): New
variable holding server->engine mapping.
(gnus-search-server-to-engine): See if we've already instantiated this
server. If so, return it. If not, instantiate it and save in the above
variable.
(gnus-search-shutdown): Shutdown function clearing the above alist.
Eric Abrahamsen [Fri, 13 Nov 2020 04:02:09 +0000 (20:02 -0800)]
Make sure Gnus search groups search topics recursively
* lisp/gnus/gnus-group.el (gnus-group-make-search-group,
gnus-group-read-ephemeral-search-group): If a search is initiated from
a topic line, make sure we get all the groups under that topic (and
under sub-topics).
* lisp/international/ucs-normalize.el
(quick-check-composition-list-to-regexp): Don't add an explicit
pattern for U+1161..U+1175 and U+11a8..U+11c2 since these are already
part of `combining-chars'.
Michael Albinus [Fri, 13 Nov 2020 15:55:08 +0000 (16:55 +0100)]
Some minor Tramp fixes, resulting from test campaign
* lisp/net/tramp.el (tramp-handle-write-region):
* lisp/net/tramp-adb.el (tramp-adb-handle-write-region):
* lisp/net/tramp-sh.el (tramp-sh-handle-write-region):
* lisp/net/tramp-smb.el (tramp-smb-handle-write-region): Use `current-time'
if needed.
* lisp/net/tramp-gvfs.el (tramp-gvfs-gio-mapping):
(tramp-gvfs-do-copy-or-rename-file): Remove "gvfs-rename", it is
not trustworthy.
* test/lisp/net/tramp-tests.el (tramp-test07-file-exists-p): Check also for
symlinked files in trash.
(tramp-test20-file-modes): Revert last change, it was a thinko.
Robert Pluim [Thu, 12 Nov 2020 15:51:49 +0000 (16:51 +0100)]
Emit required version when Harfbuzz is not found but Cairo is
* configure.ac: Define harfbuzz_required_ver with required
harfbuzz version, and put it in the warning message emitted when
Cairo is found but not HarfBuzz.
* lisp/progmodes/project.el (project-find-file): Don't say
anything about recognizing file names, as that may lead the user
to think that it'll check whether the string at point is an
existing file (bug#44588).
Stefan Kangas [Mon, 9 Nov 2020 21:23:04 +0000 (22:23 +0100)]
Fix mistake in describe-buffer-bindings
* src/keymap.c (Fdescribe_buffer_bindings): Fix a call in
describe-buffer-bindings. This fixes a mistake in my previous commit
to prefer the Lisp version of describe-map-tree (8a1441310aa1), where
0 was accidentally converted to Qt in two places.
Eli Zaretskii [Wed, 11 Nov 2020 19:46:43 +0000 (21:46 +0200)]
Avoid crashes in the daemon due to user interaction
* src/minibuf.c (read_minibuf): Avoid crashes in the daemon if the
init file invokes some kind of minibuffer interaction, by not
updating the selected frame if it's the initial frame.
(Bug#44583)
Juri Linkov [Wed, 11 Nov 2020 19:18:31 +0000 (21:18 +0200)]
In dired-query use read-char-from-minibuffer with bound help-char (bug#42708)
* lisp/dired-aux.el (dired-query): Replace read-char-choice call
with read-char-from-minibuffer.
* lisp/subr.el (read-char-choice): Restore the previous version
that uses read-key.
(read-char-from-minibuffer): Bind help-char to help-form-show
when help-form is non-nil.
* lisp/progmodes/python.el
(python-font-lock-keywords-maximum-decoration): `symbol-name'
should not be quantified by a `+' as it is redundant and performs
very badly (bug#44572).
* lisp/cedet/semantic.el (semantic-submode-list):
(semantic-default-submodes): Remove mention of
global-cedet-m3-minor-mode, which no longer exists, apparently
(bug#44565).
Fix font lock of assignments with type hints in Python
* lisp/progmodes/python.el
(python-font-lock-keywords-maximum-decoration): Fix regular
expressions for font lock of assignments with type hints (bug#44568).
The font lock of assignments with type hints in Python is rather bad.
Consider the following example:
As things stand right now, only ‘var1’ would be highlighted. To make
things worse, the ‘Mapping’ type hint of ‘var2’ would also be
highlighted, which is entirely incorrect.
This commit makes all of ‘var1’ through ‘var5’ be highlighted
correctly.
Harald Jörg [Wed, 11 Nov 2020 09:42:44 +0000 (10:42 +0100)]
Cleanup of the test file for cperl-mode
* test/lisp/progmodes/cperl-mode-tests.el
(cperl--run-test-cases): New macro, factored out from various
indentation / rewriting tests. Contains documentation of the
format used by the cperl-mode-resources files.
(cperl-test-bug-19709): Replace 'next-line' by 'forward-line'.
(cperl-test-indent-exp),
(cperl-test-indent-styles),
(cperl-test-bug-30393): Use the new macro.
(cperl-test-bug-19709): Make fit for Emacs 26.
(cperl-test-indent-styles): Skip for Perl mode (bug#44561).
(server--create-frame): New function, extracted from
`server-create-dumb-terminal-frame`.
(server-create-window-system-frame, server-create-tty-frame):
(server-create-dumb-terminal-frame): Use it.
Eliza Velasquez [Wed, 11 Nov 2020 03:14:03 +0000 (22:14 -0500)]
* lisp/server.el: Fix frame creation on dumb terminals (bug#25547)
(server-create-dumb-terminal-frame): New function.
(server-process-filter): Use it.
(server-delete-client): Don't delete tty terminal when it's not
exclusive to this client.
Juri Linkov [Tue, 10 Nov 2020 19:27:37 +0000 (21:27 +0200)]
Don't set file name variable in org-element-parse-secondary-string (bug#44524)
* lisp/org/org-element.el (org-element-parse-secondary-string):
Don't set buffer-local variables buffer-file-name and buffer-file-truename
in temporary buffer.
Tom Fitzhenry [Mon, 9 Nov 2020 11:19:10 +0000 (22:19 +1100)]
Remove extra process call from vc-hg-registered
Prefer vc-state to benefit from its caching (bug#44534)
This same technique is used in vc-git.el,
per commit 2018-06-28 "Remove extra process call from vc-git-find-file-hook" 93c41ce6aa64b14fc9bd7bdd0d909915a79191cd.
* lisp/vc/vc-hg.el (vc-hg-registered): Use vc-state rather than vc-hg-state.
Andrew G Cohen [Tue, 10 Nov 2020 00:19:43 +0000 (08:19 +0800)]
Remove ephemeral group on error or null result
* lisp/gnus/nnselect.el (nnselect-request-group): If an ephemeral
group is empty, there is nothing to see, so remove the group.
(nnselect-run): Catch and return an empty artlist on error.
Fix undefined behavior when fetching glyphs from the display vector.
You can trigger this rather obscure bug by enabling selective display
if the second glyph in its display vector has an invalid face. For
example, evaluate
* test/lisp/emacs-lisp/rx-tests.el (rx-compat): Use with-no-warnings
instead of with-suppressed-warnings which complains when running
the test interactively.
Eli Zaretskii [Mon, 9 Nov 2020 15:35:52 +0000 (17:35 +0200)]
Fix compilation of image.c on MS-Windows
This is a followup to last change in image.c.
* src/image.c (rsvg_handle_get_intrinsic_dimensions): Define to
call fn_rsvg_handle_get_intrinsic_dimensions.
(svg_css_length_to_pixels): Compile only for librsvg >= 2.46.0, as
RsvgLength type was not defined before.
Eli Zaretskii [Mon, 9 Nov 2020 15:22:25 +0000 (17:22 +0200)]
Avoid breaking Arabic shaping in 'window-text-pixel-size'
* src/xdisp.c (CHAR_COMPOSED_P): If the bidi_p flag is not set,
pass -1 to composition_reseat_it, so that the shaping engine will
figure out the directionality of the text. This is important,
e.g., when using move_it_* functions in some context that is not
redisplay, such as 'window-text-pixel-size'. (Bug#44521)
Alan Third [Sat, 31 Oct 2020 15:14:34 +0000 (15:14 +0000)]
Fix crash in ns_mouse_position (bug#44313)
* src/nsterm.m (ns_destroy_window): Close the window before freeing
the frame resources so we don't end up accessing the frame struct
after it's been freed.
Stefan Kangas [Mon, 9 Nov 2020 10:35:32 +0000 (11:35 +0100)]
Remove test for return value of set-keymap-parent
* test/src/keymap-tests.el
(keymap-keymap-set-parent/returns-parent): Remove test for the return
value of set-keymap-parent. It is not clear that returning the value
is a very good idea.
Problem pointed out by Stefan Monnier <monnier@iro.umontreal.ca>.
Eric Abrahamsen [Mon, 9 Nov 2020 00:32:10 +0000 (16:32 -0800)]
Add more protections to gnus-search query parsing
* lisp/gnus/gnus-group.el (gnus-group-make-search-group,
gnus-group-read-ephemeral-search-group): If the query is coming in via
the old 'nnir-query-spec key, we know not to parse it.
* lisp/gnus/gnus-search.el (gnus-search-make-query-string): Check if
the query was sent in as '(query "query"), and not '(query . "query).
(gnus-search-imap-search-keys): Add x-gm-raw to imap search keys.
(gnus-search-prepare-query): If we know this query should be raw,
don't even try parsing it, as it probably won't work.
Juri Linkov [Sun, 8 Nov 2020 19:45:02 +0000 (21:45 +0200)]
* lisp/progmodes/project.el: Don't truncate the saved project list.
* lisp/progmodes/project.el (project--write-project-list):
Let-bind print-length and print-level to nil to not truncate the
saved project list with unreadable ellipsis.
Eric Abrahamsen [Sun, 8 Nov 2020 16:37:03 +0000 (08:37 -0800)]
Another backwards-compatibility fix for gnus-search
* lisp/gnus/gnus-search.el (gnus-search-server-to-engine): Because of
the way we've set up the obsolete variable alias for
`nnir-method-default-engines', we may end up with its value in
`gnus-search-default-engines'. Make the check for "old style" values
general, so we catch them no matter where they came from.
Glenn Morris [Sat, 7 Nov 2020 17:57:56 +0000 (09:57 -0800)]
Merge from origin/emacs-27
f5d7fb3a2d (origin/emacs-27) Fix 'uudecode-decode-region-internal' in... d4242177da Fix 'send-string-to-terminal' writing very long strings 9da0f4026c * lisp/subr.el (read-char-from-minibuffer): Doc fix. (Bug... 9899f74e4e Merge branch 'emacs-27' of git.savannah.gnu.org:/srv/git/e... a6fcba783e Fix documentation of 'windmove-swap-states-default-keybind... f4acd7a924 Split windows evenly when 'min-margins' parameter was set ...
Glenn Morris [Sat, 7 Nov 2020 17:57:56 +0000 (09:57 -0800)]
Merge from origin/emacs-27
53933cdf5c ; * lisp/international/mule.el (define-coding-system): Doc... e90ffcf759 * src/w32fns.c (Fw32_register_hot_key): Doc fix. (Bug#44456) 89740e9cb5 Prevent redisplay from moving point behind user's back 5932df7435 Document that the :match function for a widget takes an ex... 1b7ab9d0ac Don't render XML declaration of an HTML document (bug#44348)
Eric Abrahamsen [Sat, 7 Nov 2020 17:40:40 +0000 (09:40 -0800)]
Various fixes and backward compatibility for gnus-search
* lisp/gnus/gnus-group.el (gnus-group-make-search-group,
gnus-group-read-ephemeral-search-group): Check for and accept the old
nnir-* spec keys.
* lisp/gnus/gnus-search.el (shared-initialize): Use
generate-new-buffer instead of doing it ourselves.
(gnus-search-server-to-engine): Raise an informative error explicitly
if we can't find a search engine, rather than letting it fall through
to something less helpful.
(gnus-search-make-spec): Add `gnus-search--complete-key-data' to
`completion-at-point-functions' locally, not globally.
Mauro Aranda [Sat, 7 Nov 2020 12:53:21 +0000 (09:53 -0300)]
Add test for recent change in enable-theme
* test/lisp/custom-tests.el (custom-test-enable-theme-keeps-settings):
Enabling a theme should not change the theme settings, so test for
that. See
https://lists.gnu.org/archive/html/emacs-devel/2020-11/msg00232.html
Kazuhiro Ito [Thu, 5 Nov 2020 10:48:08 +0000 (19:48 +0900)]
Fix 'uudecode-decode-region-internal' in multibyte buffers
* lisp/mail/uudecode.el (uudecode-decode-region-internal): Fix
inserting the decoded string into a multibyte buffer. Optimize by
working with characters, not strings. (Bug#44411)