Dmitry Gutov
c69c65676d
(ruby-mode-set-encoding): Use 'save-restriction'
...
* lisp/progmodes/ruby-mode.el (ruby-mode-set-encoding):
Use 'save-restriction' (bug#45349).
2020-12-22 03:15:45 +02:00
Basil L. Contovounesios
27fab4b140
Tiny string-clean-whitespace simplification
...
* lisp/emacs-lisp/subr-x.el (string-clean-whitespace): Streamline by
treating replacement string as being literal and having fixed case.
2020-12-21 22:36:55 +00:00
Lars Ingebrigtsen
7e86d3bb9b
Make string-chop-newline more efficient
...
* lisp/emacs-lisp/subr-x.el (string-chop-newline): Make more
efficient.
2020-12-21 23:18:05 +01:00
Lars Ingebrigtsen
768522750d
Make string-clean-whitespace work on non-ASCII whitespace, too
...
* lisp/emacs-lisp/subr-x.el (string-clean-whitespace): Also clean
up non-ASCII whitespace.
2020-12-21 22:41:37 +01:00
Lars Ingebrigtsen
c9a95237a8
Add try-completion to the string shortdoc
...
* lisp/emacs-lisp/shortdoc.el (string): Mention try-completion here.
2020-12-21 22:08:56 +01:00
Lars Ingebrigtsen
f329a3180e
Add string-chop-newline
...
* doc/lispref/strings.texi (Creating Strings): Document it.
* lisp/emacs-lisp/subr-x.el (string-chop-newline): Add new function.
2020-12-21 22:05:37 +01:00
Basil L. Contovounesios
e967ba3018
; Fix recent string utility additions
...
* etc/NEWS: Fix typo.
* lisp/emacs-lisp/subr-x.el (string-limit): Fix typos in docstring.
Simplify.
(string-slice): Improve docstring wording.
(string-pad): Simplify.
2020-12-21 20:51:29 +00:00
Lars Ingebrigtsen
fd9431dde4
Fix shorter-than-length case for string-limit
...
* lisp/emacs-lisp/subr-x.el (string-limit): Fix
shorter-than-length case.
2020-12-21 20:42:17 +01:00
Andrea Corallo
9676e4d776
* Fix a test in auth-source-tests.el
...
* test/lisp/auth-source-tests.el
(auth-source-test-secrets-create-secret): Redefine `read-string'
respecting the original number of arguments.
2020-12-21 20:22:03 +01:00
Andrea Corallo
ebf8963a91
* Fix a bunch of known type specifiers
...
* lisp/emacs-lisp/comp.el (comp-known-type-specifiers): Fixes for:
=, string-search, substring.
2020-12-21 20:22:03 +01:00
Andrea Corallo
5376563517
Fix `comp-add-call-cstr' and add a test
...
* lisp/emacs-lisp/comp.el (comp-add-call-cstr): Fix it.
* test/src/comp-tests.el (assume-in-loop-1): New test.
* test/src/comp-test-funcs.el (comp-test-assume-in-loop-1-f): New
function.
2020-12-21 20:22:03 +01:00
Andrea Corallo
6f3570cd4a
Fix value type inference for doubly negate constraints
...
* lisp/emacs-lisp/comp.el (comp-fwprop-insn): Do not propagate in
case of double negation.
* test/src/comp-test-funcs.el (comp-test-assume-double-neg-f):
New function.
* test/src/comp-tests.el (assume-double-neg): New test.
2020-12-21 20:22:03 +01:00
Andrea Corallo
9bbe6eab6c
Fix native compiler tests when they are bytecompiled
...
* test/lisp/emacs-lisp/comp-cstr-tests.el (comp-cstr-test-ts)
(comp-cstr-typespec-test, comp-cstr-typespec-tests-alist): Eval
also at compile time.
* test/src/comp-tests.el (comp-tests-type-spec-tests)
(comp-tests-define-type-spec-test): Likewise.
2020-12-21 20:22:03 +01:00
Andrea Corallo
e0f20da6ec
Simplify correctly (or (integer 1 1) (not (integer 1 1))) as t
...
* lisp/emacs-lisp/comp-cstr.el (comp-cstr-union-1-no-mem): Logic
update.
* test/lisp/emacs-lisp/comp-cstr-tests.el
(comp-cstr-typespec-tests-alist): Add a test.
2020-12-21 20:22:03 +01:00
Andrea Corallo
3540b1f167
* Guarantee fwprop convergence and termination
...
* lisp/emacs-lisp/comp.el (comp-emit-call-cstr): Have new-mvar as
LHS *and* RHS when constraining in and to ensure monotonicity and
fwprop convergence.
(comp-fwprop): Raise a warning for debug reasons in case fwprop
does not converge within 100 iterations.
2020-12-21 20:22:03 +01:00
Andrea Corallo
c70c08013f
* Allow for overlapping src and dst in cstr set operations
...
* lisp/emacs-lisp/comp-cstr.el (comp-cstr-union-1-no-mem)
(comp-cstr-union-1, comp-cstr-intersection-no-mem)
(comp-cstr-intersection): Logic update.
2020-12-21 20:22:03 +01:00
Andrea Corallo
8e816b0ad5
Symplify type specifier (not t) as nil
...
* lisp/emacs-lisp/comp-cstr.el (comp-cstr-intersection-no-mem):
Add logic.
* test/lisp/emacs-lisp/comp-cstr-tests.el
(comp-cstr-typespec-tests-alist): Add two tests.
2020-12-21 20:22:03 +01:00
Andrea Corallo
07b75deea9
Enhance type inference constraining function arguments
...
* lisp/emacs-lisp/comp.el: Add some commentary.
(comp-cond-cstrs-target-mvar): Rename and update docstring.
(comp-add-cond-cstrs): Update to use
`comp-cond-cstrs-target-mvar'.
(comp-emit-call-cstr, comp-lambda-list-gen, comp-add-call-cstr):
New functions.
(comp-add-cstrs): Call `comp-add-call-cstr'.
* test/src/comp-tests.el (comp-tests-type-spec-tests): Update two
type specifier tests.
2020-12-21 20:22:03 +01:00
Andrea Corallo
23791cf74d
* Allow for modifying insn-cell inside `comp-loop-insn-in-block'
...
* lisp/emacs-lisp/comp.el (comp-loop-insn-in-block): Update.
2020-12-21 20:22:02 +01:00
Andrea Corallo
02551085c1
* Rename comp-cond-cstr into comp-add-cstrs
...
* lisp/emacs-lisp/comp.el (comp-add-cond-cstrs-target-mvar)
(comp-add-cond-cstrs, comp-add-cstrs): Rename comp-cond-cstr
-> comp-add-cstrs.
2020-12-21 20:22:02 +01:00
Andrea Corallo
d072ee9d34
* Two minors in comp.el
...
* lisp/emacs-lisp/comp.el (comp-known-func-cstr-h)
(comp-ret-type-spec): Style.
2020-12-21 20:22:02 +01:00
Andrea Corallo
7074988d13
* Add a type specifier test to comp-cstr-tests.el
...
* test/lisp/emacs-lisp/comp-cstr-tests.el
(comp-cstr-typespec-tests-alist): Add a test.
2020-12-21 20:22:02 +01:00
Andrea Corallo
34c1d75a31
* Enumerate and split type specifier tests in comp-tests.el to ease debug
...
* test/src/comp-tests.el (comp-tests-type-spec-tests): Enumerate.
(comp-tests-define-type-spec-test): New function.
(comp-tests-define-type-spec-tests): New macro to expand tests.
2020-12-21 20:22:02 +01:00
Andrea Corallo
48d43f579e
* Improve constraint simplification logic in comp-cstr.el
...
* lisp/emacs-lisp/comp-cstr.el (with-comp-cstr-accessors):
Simplify.
(comp-cstr-empty-p): New Funchion.
(comp-split-pos-neg): Minor.
(comp-normalize-typeset): Logic update.
(comp-union-typesets): Minor.
(comp-intersect-two-typesets): New functio.
(comp-intersect-typesets): Logic update.
(comp-range-union, comp-range-intersection): Minor.
(comp-cstr-union-homogeneous, comp-cstr-union-1-no-mem)
(comp-cstr-intersection-homogeneous)
(comp-cstr-intersection-no-mem, comp-cstr-negation)
(comp-type-spec-to-cstr, comp-cstr-to-type-spec): Logic update.
* lisp/emacs-lisp/comp-cstr.el (with-comp-cstr-accessors): Simplify.
2020-12-21 20:21:33 +01:00
Lars Ingebrigtsen
cf2e832185
Rename slice-string to string-slice
...
* lisp/emacs-lisp/subr-x.el (string-slice): Rename from slice-string.
* doc/lispref/strings.texi (Creating Strings): Ditto.
2020-12-21 20:18:57 +01:00
Lars Ingebrigtsen
b3dec31766
Add `string-pad'
...
* doc/lispref/strings.texi (Creating Strings): Document it.
* lisp/emacs-lisp/shortdoc.el (string): Add example.
* lisp/emacs-lisp/subr-x.el (string-pad): New function.
2020-12-21 20:01:28 +01:00
Andrea Corallo
a0c0daf7a1
* Fix a number of type specifier simplification tests
...
* test/lisp/emacs-lisp/comp-cstr-tests.el
(comp-cstr-typespec-tests-alist): Fix a number of tests.
2020-12-21 19:01:22 +01:00
Andrea Corallo
bad18f509d
* Improve comp-fwprop pass
...
Wire-up comp-cstr.el routines in fwprop and constraint mvars also on
the else side of branches.
* lisp/emacs-lisp/comp.el (comp-emit-assume)
(comp-cond-cstr-target-mvar, comp-cond-cstr-func)
(comp-fwprop-insn): Logic update.
(comp-mvar-value-vld-p, comp-mvar-propagate, comp-fwprop-call):
Handle neg slot.
2020-12-21 19:00:39 +01:00
Lars Ingebrigtsen
87e422f104
Beef up the Emacs string utility set a bit
...
* doc/lispref/strings.texi (Modifying Strings): Document them.
* lisp/emacs-lisp/shortdoc.el (string): Add examples.
* lisp/emacs-lisp/subr-x.el (string-clean-whitespace)
(string-fill, string-limit, string-lines, slice-string): New
functions.
2020-12-21 18:53:40 +01:00
Stefan Kangas
7b3367a0b5
* lisp/so-long.el: Decrease use of passive voice.
...
Suggested by Richard Stallman <rms@gnu.org>.
2020-12-21 18:45:53 +01:00
Eli Zaretskii
e352abeac1
Fix frame creation on X when tool bar is disabled
...
* src/xterm.c (handle_one_xevent): Restrict the fix for bug#44002
to situations when we are asked by the WM to create a window with
bogus 1x1 dimensions. (Bug#44794)
2020-12-21 19:27:02 +02:00
Andrea Corallo
2a117ad3d7
* Add mvar pretty print support when dumping LIMPLE
...
* lisp/emacs-lisp/comp.el (comp-prettyformat-mvar)
(comp-prettyformat-insn): New function.
(comp-log-func): Update to use `comp-prettyformat-insn'.
(comp-finalize-phis): Change LIMPLE phi format to ease
`comp-prettyformat-insn' destructuring.
2020-12-21 18:23:46 +01:00
Michael Albinus
2d19dbdd52
Fix permission problem in Tramp's copy-file
...
* lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-directly):
Take care of PRESERVE-UID-GID.
2020-12-21 16:37:29 +01:00
Stefan Kangas
a90836c638
* doc/misc/efaq.texi (New in Emacs 27): Add section.
2020-12-21 16:11:35 +01:00
Mattias Engdegård
faf3613cba
; * src/nsfns.m (all_nonzero_ascii): comment correction
2020-12-21 16:11:32 +01:00
Stefan Kangas
e470881a42
Drop XEmacs support for EDE ELisp projects
...
* lisp/cedet/ede/proj-elisp.el (ede-proj-target-elisp): Remove
XEmacs support.
(ede-xemacs-compiler): Make obsolete.
2020-12-21 16:32:10 +01:00
Stefan Kangas
711fe70dd8
* doc/misc/efaq.texi (Latest version of Emacs): Bump version.
2020-12-21 15:57:51 +01:00
Andrea Corallo
5b10a0324d
Fix Windows build link-time zlib error (bug#45303)
...
* src/lisp.h (md5_gz_stream): Declare.
* src/comp.c (accumulate_and_process_md5)
(final_process_md5, md5_gz_stream): Remove.
* src/decompress.c (accumulate_and_process_md5)
(final_process_md5, md5_gz_stream): Move from comp.c.
2020-12-21 10:32:54 +01:00
Andrea Corallo
2526032ea9
* src/comp.c (eln_load_path_final_clean_up): Fix call arg order (bug#45303).
2020-12-21 08:51:32 +01:00
Andrea Corallo
f4153cac3e
* src/comp.c (Fcomp__compile_ctxt_to_file): Fix sigmask store/restore.
2020-12-21 08:49:13 +01:00
Lars Ingebrigtsen
ca36669c88
Fix problem with entering Gnus groups when Gnus isn't running
...
* lisp/gnus/gnus-sum.el (gnus-update-summary-mark-positions):
Don't bug out when Gnus isn't running (bug#45330).
2020-12-21 05:55:32 +01:00
Dario Gjorgjevski
b2ce94fa5e
Make python-mode fontify more assignment statements
...
* lisp/progmodes/python.el (python-font-lock-assignment-matcher): New
function to match assignment statements.
(python-rx): Add `assignment-target' and `grouped-assignment-target'.
(python-font-lock-keywords-maximum-decoration): Add new matchers
(bug#45341).
2020-12-21 05:41:07 +01:00
Dmitry Gutov
759ec25769
Generic-ify xref-location-column
...
* lisp/progmodes/xref.el (xref-location-column):
Create a generic from xref-file-location-column, to use in the
common rendering code (bug#36967).
(xref--insert-xrefs): Update accordingly.
* test/lisp/progmodes/xref-tests.el
(xref-matches-in-directory-finds-two-matches-on-the-same-line)
(xref-matches-in-directory-finds-an-empty-line-regexp-match):
Ditto.
2020-12-21 03:38:37 +02:00
Juri Linkov
c3ad28c290
De-duplicate lines in Xref buffers
...
* lisp/progmodes/xref.el (xref--insert-xrefs):
Render matches coming from the same line together (bug#36967).
(xref--item-at-point): Account for the above.
2020-12-21 03:22:23 +02:00
Philipp Stephani
174607e5ff
Unbreak build after commit 1a0a11f7d2.
...
The commit only changed a comment in 'struct buffer', so the portable
dumper doesn't need to be adapted.
* src/pdumper.c (dump_buffer): Update hash for 'struct buffer'.
2020-12-21 00:17:56 +01:00
Alan Third
537e96f6ac
Fix image cache lookup
...
* src/image.c (lookup_image): ignore_colors should be false as we want
to search for images with matching colors.
2020-12-20 21:29:16 +00:00
Alan Third
2c9b488121
Remove unnecessary string conversion
...
* src/nsfns.m (ns_set_represented_filename): NSString can load List
strings directly now.
2020-12-20 21:29:16 +00:00
Andrea Corallo
f244c21902
Merge remote-tracking branch 'savannah/master' into HEAD
2020-12-20 22:08:42 +01:00
Andrea Corallo
72c1a41573
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
2020-12-20 21:21:39 +01:00
Juri Linkov
1a7033f1f3
* lisp/simple.el (goto-line-read-args): Use number-at-point (bug#45199)
...
* lisp/subr.el (goto-char--read-natnum-interactive): Add the value of
point to the end of default values, and move function slightly higher.
2020-12-20 22:05:51 +02:00