Andrea Corallo [Sun, 20 Dec 2020 19:53:22 +0000 (20:53 +0100)]
Have native compiler always preserve multibyte strings (bug#45342)
* lisp/emacs-lisp/comp.el (comp-final): Escape multibyte string
when offloading compilation to child process.
* test/src/comp-test-funcs.el (comp-test-45342-f): New function
* test/src/comp-tests.el (bug-45342): New test
Andrea Corallo [Sat, 12 Dec 2020 21:20:28 +0000 (22:20 +0100)]
* Allow for adding constraints targetting blocks with multiple predecessors
This commit remove the limitaiton we had not being able to add
constraints derived from conditional branches to basic blocks with
multiple predecessors. When this condition is verified we add a new
dedicated basic block to hold the constraints.
* lisp/emacs-lisp/comp.el (comp-block, comp-edge): Better slot
type specifiers.
(comp-block-cstr): New struct specializing `comp-block'.
(make-comp-edge): New function.
(comp-func): Better test function + doc for `blocks' slot.
(comp-limple-lock-keywords): Update possible basic block names.
(comp-emit-assume): Recive directly the block instead of its name.
(comp-add-new-block-beetween): New function.
(comp-cond-cstr-target-block): Logic update and use
`comp-add-new-block-beetween'.
(comp-cond-cstr-func): Make use of the latter.
(comp-compute-edges): Make use of `make-comp-edge'.
Andrea Corallo [Sat, 12 Dec 2020 19:43:04 +0000 (20:43 +0100)]
* Memoize `comp-cstr-intersection'
* lisp/emacs-lisp/comp-cstr.el (comp-cstr-ctxt): Add new slot
`intersection-mem'.
(comp-cstr-intersection-homogeneous): Fix non local exit target.
(comp-cstr-intersection-no-mem): Rename from
`comp-cstr-intersection'.
(comp-cstr-intersection): New function.
Zajcev Evgeny [Thu, 3 Dec 2020 15:37:18 +0000 (18:37 +0300)]
Explicitly specify svg base_uri using `:base-uri' image property
* src/image.c (svg_load): Check `:base-uri' image property to
explicitly set base_uri for images embedded into SVG
(enum svg_keyword_index):
(svg_format): Add :base-uri.
* lisp/svg.el (svg-embed-base-uri-image): New function to embed images
located relative to images `:base-uri'
* lisp/tutorial.el (tutorial--buffer): New variable (bug#27998).
(tutorial--save-on-kill): Use it.
(help-with-tutorial): Set it and add new function to
kill-emacs-query-functions.
Preserve point in dired buffers in dired-*-find-file* commands
* lisp/dired.el (dired--find-file): New function (bug#28949).
(dired-find-file): Use it.
(dired-mouse-find-file): Ditto.
(dired-find-file-other-window): Ditto.
Eli Zaretskii [Sat, 12 Dec 2020 11:25:35 +0000 (13:25 +0200)]
Unbreak the MS-Windows build broken by recent changes
* src/image.c (rsvg_handle_set_dpi_x_y) [WINDOWSNT]: DEF_DLL_FN it.
(init_svg_functions): LOAD_DLL_FN rsvg_handle_set_dpi_x_y.
<rsvg_handle_set_dpi_x_y>: Define as a macro
Eli Zaretskii [Sat, 12 Dec 2020 11:12:57 +0000 (13:12 +0200)]
Improve support for 'memory-report' on MS-Windows
* src/w32term.c (w32_image_size): New function.
* src/image.c (image_frame_cache_size) [HAVE_NTGUI]: Support
reporting the size of frame image cache.
(image_frame_cache_size, Fimage_cache_size): The total size is
now of the type 'size_t', not 'int'.
Alan Third [Fri, 11 Dec 2020 19:52:20 +0000 (19:52 +0000)]
Improve some NS drawing code
* src/nsterm.m (ns_update_end): There's no need to schedule a redraw
if nothing has been changed.
(ns_set_vertical_scroll_bar):
(ns_set_horizontal_scroll_bar): Fix the logic for clearing under the
scrollbars.
(ns_clear_under_internal_border): No need to clip, the default
clipping rectangle will be fine.
Alan Third [Wed, 9 Dec 2020 00:02:44 +0000 (00:02 +0000)]
Use real DPI when rendering SVGs (bug#45124)
* src/image.c (svg_css_length_to_pixels): Pass in a DPI value instead
of using a hard coded value.
(svg_load_image): Set the DPI on the rsvg_handle, and pass it to
svg_css_length_to_pixels.
Harald Jörg [Fri, 11 Dec 2020 16:48:30 +0000 (17:48 +0100)]
; cperl-mode: Eliminate fallbacks if font-lock isn't loaded
* lisp/progmodes/cperl-mode.el (cperl-find-pods-heres):
Eliminate conditionals which always evaluate to true if
font-lock is preloaded (since Emacs 22.1). (Bug#45183)
* lisp/gnus/gnus-win.el (gnus-buffer-configuration): Include
shell-command-buffer-name value rather than symbol in pipe
configuration. (Bug#39138, bug#45154)
Eric Abrahamsen [Fri, 13 Nov 2020 04:03:05 +0000 (20:03 -0800)]
Be more graceful about handling Gnus search errors
One search may be applied to several servers: don't let one server's
error derail the whole process.
* lisp/gnus/gnus-search.el (gnus-search-config-error): Define new
error.
(gnus-search-run-search, gnus-search-server-to-engine): Raise this
specific error as appropriate.
(gnus-search-run-query): Catch this error and effectively demote it.
Eli Zaretskii [Thu, 10 Dec 2020 15:10:06 +0000 (17:10 +0200)]
Avoid segfaults in pos_visible_p
* src/xdisp.c (pos_visible_p): Don't try accessing the glyphs
produced by iterator whose glyph_row was set to NULL; instead,
record the X coordinate before the display string when moving past
it, and use the recorded coordinate if needed. (Bug#45156)
* test/src/casefiddle-tests.el (casefiddle-tests-char-casing):
(upcase ?ß) now returns ?ẞ (U+7838), partly for technical reasons but
the previous behaviour was arbitrary and arguably less useful.
Correct upcasing of ß is normally SS, which is what Fupcase returns if
given a string, or (for special purposes) ẞ.
Stefan Kangas [Wed, 9 Dec 2020 21:40:31 +0000 (22:40 +0100)]
Fix thinko in my previous commit
* lisp/pcomplete.el (pcomplete-comint-setup): Fix thinko in my
previous commit. This was not a quoted symbol but a variable, and
therefore cannot use setq-local.
Juri Linkov [Wed, 9 Dec 2020 19:30:47 +0000 (21:30 +0200)]
Remove isearch-input-method-local-p and always set buffer-local input-method
* lisp/isearch.el (isearch-input-method-local-p): Remove defvar.
(isearch-mode): Don't set isearch-input-method-local-p.
Set buffer-local input-method-function to nil.
(isearch-done): When isearch-input-method-function is still non-nil,
set the buffer-local value of input-method-function. (Bug#45005)
* lisp/international/isearch-x.el (isearch-toggle-specified-input-method)
(isearch-toggle-input-method, isearch-transient-input-method):
Don't set isearch-input-method-local-p to t. Set buffer-local
input-method-function to nil.
* lisp/language/korea-util.el (isearch-toggle-korean-input-method)
(isearch-hangul-switch-symbol-ksc, isearch-hangul-switch-hanja):
Don't set isearch-input-method-local-p to t. Set buffer-local
input-method-function to nil.
* lisp/progmodes/compile.el (compilation-error-regexp-alist-alist):
Rule 'gradle-kotlin': don't be more forgiving than necessary; we know
exactly what the output looks like (see
https://github.com/JetBrains/kotlin/commit/\ ffe8ae3840d7b9bdc82170c8181031f05ced68bd) and there is no reason to
risk mismatches or expensive backtracking (bug#18109). Recognise
'info' level messages. Convert to rx.
* doc/lispref/display.texi (Defining Faces):
* doc/lispref/variables.texi (Defining Variables): Update the
descriptions of 'defvar' and 'defface' per recent changes in
'eval-last-sexp'. (Bug#45125)
Recognise ß properly as a lower-case letter (bug#11309)
ß was incorrectly treated as a caseless character and thus not matched
by the regexp [[:lower:]] (or, in case-folding mode, [[:upper:]]).
The reason is that the upcase table maps it to itself, which can be
remedied by mapping it to ẞ (U+7838) instead. Doing so does not
affect upcasing since the special-uppercase property maps it to SS.
* lisp/international/characters.el (tbl): Map ß to ẞ in the upcase
table.
* test/src/regex-emacs-tests.el (regexp-eszett): Uncomment previously
failing tests. Add checks to make sure that case transformations
remain valid.
* lisp/vc/ediff-ptch.el (ediff-fixup-patch-map): Offer to create
the inferred file name (if it doesn't exist) (bug#8009). This allows
applying a patch that creates a file.
Fix [:upper:] and [:lower:] for Unicode characters (bug#11309)
* src/regex-emacs.c (execute_charset): Add canon_table argument to
allow expression of a correct predicate for [:upper:] and [:lower:].
(mutually_exclusive_p, re_match_2_internal): Pass extra argument.
* test/src/regex-emacs-tests.el (regexp-case-fold, regexp-eszett):
New tests. Parts of regexp-eszett still fail and are commented out.