When optimizing arithmetic operations, avoid optimizations that
are valid for mathematical numbers but invalid for floating-point.
For example, do not optimize (+ 1 v 0.5) to (+ v 1.5), as they may
not be the same due to rounding errors. In general,
floating-point numbers cannot be constant-folded, since that would
make .elc files platform-dependent.
* lisp/emacs-lisp/byte-opt.el (byte-optimize-associative-math):
Do not optimize floats.
(byte-optimize-nonassociative-math, byte-optimize-approx-equal)
(byte-optimize-delay-constants-math, byte-compile-butlast)
(byte-optimize-logmumble):
Remove; no longer used.
(byte-optimize-minus): Do not optimize (- 0 x) to (- x).
(byte-optimize-multiply): Do not optimize (* -1 x) to (- x).
(byte-optimize-divide): Do not optimize (/ x -1) to (- x).
(logand, logior, logxor): Optimize with byte-optimize-predicate
instead of with byte-optimize-logmumble.
* test/lisp/emacs-lisp/bytecomp-tests.el:
(byte-opt-testsuite-arith-data): Add a couple of test cases.
* test/lisp/emacs-lisp/eieio-tests/eieio-test-persist.el
(eieio-test-persist-hash-and-vector,
eieio-test-persist-interior-lists): Persistence does not currently
handle deeply-nested objects. Expect current failures, and mark for
future fixes.
* test/lisp/emacs-lisp/eieio-tests/eieio-test-persist.el:
(hash-equal): New comparison test for hash-tables.
(persist-test-save-and-compare): Use test for hash-tables.
(eieio-test-persist-hash-and-vector,
eieio-test-persist-interior-lists): New tests.
* test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el:
* test/lisp/emacs-lisp/eieio-tests/eieio-test-persist.el:
* test/lisp/emacs-lisp/eieio-tests/eieio-tests.el:
Remove obsolete name args where not being explicitly tested.
This commit reverts declaring `if-let' and `when-let' obsolete in
favor of the new `if-let*' and `when-let*' versions because of the
compiler warning mess (Bug#30039). Instead we make foo-let* aliases
for foo-let. The old single-tuple variable spec case is still
supported for backward compatibility.
* lisp/emacs-lisp/subr-x.el (if-let, when-let): Don't declare
obsolete. Tweak edebug specs.
(and-let): Renamed from `and-let*' for compatibility with the names
`if-let' and `when-let'.
(if-let*, when-let*, and-let*): Define as aliases for `if-let',
`when-let' and `and-let'.
* test/lisp/emacs-lisp/subr-x-tests.el (if-let-single-tuple-case-test)
(when-let-single-tuple-case-test): New tests for the single-binding
tuple case.
In the whole file, prefer the names without "*".
(cl--old-macroexpand): Remove.
(cl--sm-macroexpand): Change its calling convention, so it can use
advice-add. Extend re-binding treatment of vars so it applies to all
var-introducing forms rather than only to 'let'.
(cl-symbol-macrolet): Use advice-add rather than fset.
* lisp/emacs-lisp/cl-preloaded.el (cl-struct-define): Don't allow
structures with the same names as builtin types.
(cl--typeof-types, cl--all-builtin-types): Move from cl-generic.el and
rename.
(cl--struct-name-p): New helper function.
* lisp/emacs-lisp/cl-macs.el (cl-defstruct): Don't allow structures
with the same names as builtin types.
* lisp/emacs-lisp/cl-generic.el (cl--generic-typeof-generalizer)
(cl-generic-generalizers): Adapt to name change.
* test/lisp/emacs-lisp/cl-macs-tests.el (cl-defstruct/builtin-type):
* test/lisp/emacs-lisp/cl-preloaded-tests.el
(cl-struct-define/builtin-type): New unit tests.
* etc/NEWS: Document changed behavior.
1fc98ed073 ; Spelling fix
bb396a369c Update Org to v9.1.6
fa582153f7 Use text-pixels values only when saving framesets (Bug#30141)
6b01b9475d Minor improvement in section "Pages" of the usere manual
e8c8bd3de2 Minor improvements in user manual
26b8b92e63 Improve the "Mark" chapter of the user manual
759569fe40 Improve the "Buffers" chapter of the user manual
c2e6d121ff * lisp/term.el (term-send-input): Fix text duplication in ...
854a1c0a61 Improve "Buffers" in the user manual
# Conflicts:
# etc/NEWS
* lisp/emacs-lisp/shadow.el (load-path-shadows-find): Check for
shadowing with case-insensitive matching for files of case-insensitive
directories (as determined by `file-name-case-insensitive-p').
* test/lisp/emacs-lisp/shadow-tests.el: New test.
* test/lisp/emacs-lisp/shadow-resources/p1/foo.el:
* test/lisp/emacs-lisp/shadow-resources/p2/FOO.el: New test files.
2c0cfa6455 * ChangeLog.3: Update
4387bb44ae Update authors
bce51bd6f7 * lisp/gnus/message.el (message-do-auto-fill): Prevent do-...
bd2a2a1e84 Improve documentation of etags
7ba75b9637 Teach etags new interpreters for some languages
1f7f03742d * lisp/emacs-lisp/generator.el (iter-defun): Add 'doc-stri...
dbb4aac212 * lisp/emacs-lisp/syntax.el (syntax-propertize): Fix bug#2...
80463a43da Improve documentation of fill-separate-heterogeneous-words...
4bd2416d55 Fix documentation of some x-* functions
9c2b11484f Inherit query-on-exit flag to stderr process (Bug#30031)
3efb1e7def Fix Bug#30057
a9b884c60f Tag some unstable tests, and skip by default (bug#24503)
# Conflicts:
# test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
* Makefile.in (check-all): New phony target.
* test/Makefile.in (SELECTOR_DEFAULT, SELECTOR_EXPENSIVE):
Also skip unstable tests.
(SELECTOR_ALL): New variable.
(check-all): New phony target.
* test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el
(eieio-test-method-order-list-6):
* test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
(eieio-test-37-obsolete-name-in-constructor):
Mark as unstable rather than skipping on hydra.nixos.org.
Consider the expansion of `cl-loop' with a `for' clause and more
than one internal variables, X, Y, processed in parallel.
Each step updates X and Y right after update the loop variable, K; if
either X or Y depend on K, then some forms of the body are
evaluated with the wrong K (Bug#29799).
For instance, consider the following code:
(cl-loop for k below 2
for x = (progn (message "k = %d" k) 1)
and y = 1)
This code should show in *Messages*:
k = 0
k = 1
Instead, the code shows:
k = 0
k = 1
k = 2
To prevent this we must ensure that the loop condition is still
satisfied right after update the loop variable.
In the macro expansion of the example above, right after:
(setq k (+ k 1))
evaluate the rest of the body forms iif the condition
(< k 2)
is still valid.
* lisp/emacs-lisp/cl-macs.el (cl--loop-guard-cond): New variable.
(cl--parse-loop-clause): Set it non-nil if the loop contains
a for/as clause.
(cl-loop): After update the loop variable, evaluate the remaining of
the body forms just if the loop condition is still valid (Bug#29799).
* test/lisp/emacs-lisp/cl-macs-tests.el (cl-macs-loop-for-as-equals-and):
New test.
* lisp/emacs-lisp/cl-preloaded.el (cl-struct-define): Don't allow
structures with the same names as builtin types.
(cl--struct-name-p): New helper function.
* lisp/emacs-lisp/cl-macs.el (cl-defstruct): Don't allow structures
with the same names as builtin types.
* test/lisp/emacs-lisp/cl-macs-tests.el (cl-defstruct/builtin-type):
* test/lisp/emacs-lisp/cl-preloaded-tests.el
(cl-struct-define/builtin-type): New unit tests.
* etc/NEWS: Document changed behavior.
63b04c11d5 Fix copyright years by hand
5c7dd8a783 Update copyright year to 2018
220a9ecba1 Merge from Gnulib
312c565566 Don't add empty keyboard macro to macro ring (Bug#24992)
39ca289a7a Allow customization of decoding of "man" command
f8240815ea * etc/NEWS: Add security consideration note on passphrase ...
0c78822c70 Fix subtle problem with scroll-down when scroll-margin is ...
acd289c5a4 Fix problems with indexing in User manual
b240c7846b * lisp/help.el (describe-key): Only (copy-sequence elt) wh...
e879a5444a * src/buffer.c (Frestore_buffer_modified_p): Fix bug#29846
81b1028b63 Improve documentation of 'inhibit-modification-hooks' and ...
7175496d7a Fix doc string of 'enable-recursive-minibuffers'
5b38406491 Fix documentation of delsel and of killing text
# Conflicts:
# etc/NEWS
# etc/refcards/ru-refcard.tex
4122d54 Fix updating scrollbar sizes when scaling is in effect
21a212f Collect GnuTLS extensions and use them to set %DUMBFW if supp...
936136e * test/lisp/emacs-lisp/derived-tests.el: Fix copy&paste lefto...
07b7fb9 * lisp/subr.el (delayed-after-hook-functions): Rename from .....
a5b0a4e * lisp/net/shr.el (shr-string-pixel-width): Return pixel-widt...
c51e797 python.el doc fixes
c62ced5 Make 'mouse-drag-and-drop-region' more robust and customizable
(run-mode-hooks): `funcall` the functions instead of `eval`ing the forms.
* lisp/emacs-lisp/derived.el (define-derived-mode): Push functions
rather than forms (bug#29679).
The changes to cl argument parsing are not backwards compatible, and
cause inconvenience when writing macros (e.g., instead of doing '&aux
,@auxargs', some more complicated conditionals would be required).
The `cl-defstruct' macro makes use of this convenience when defining
empty structs (Bug#29728).
* lisp/emacs-lisp/cl-macs.el (cl--transform-lambda):
(cl--do-&aux, cl--do-arglist): Undo strict checking of &rest, &key,
and &aux.
* test/lisp/emacs-lisp/cl-macs-tests.el (cl-macs-bad-arglist): Remove
test.
* etc/NEWS: Explain that '&optional' not followed by a variable is now
an error.
* lisp/emacs-lisp/cl-macs.el (cl--transform-lambda, cl--do-&aux)
(cl--do-arglist): Also reject '&optional', '&rest', or '&aux' not
followed by a variable for consistency.
* test/lisp/emacs-lisp/cl-macs-tests.el (cl-macs-bad-arglist): New
test.
They have been deprecated for a decade now.
* src/lread.c (Fload): Don't use record_unwind_protect to warn about
old-style backquotes any more. They now generate a hard error.
(read1): Signal an error when detecting old-style backquotes. Remove
unused label.
(syms_of_lread): Remove unused internal variable
'lread--old-style-backquotes'.
(load_error_old_style_backquotes): Rename from
'load_warn_oldstyle_backquotes'. Signal an error.
* lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): Remove check
from byte compiler. It isn't triggered any more.
* test/src/lread-tests.el (lread-tests--old-style-backquotes): Adapt
unit test.
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-tests--old-style-backquotes)
(bytecomp-tests-function-put): Adapt unit tests.
* etc/NEWS: Document change.
* test/Makefile.in [EMACS_HYDRA_CI]: Always show log for eieio-tests.
* test/lisp/emacs-lisp/eieio-tests/eieio-tests.el (top-level): Trace
cl-generic functions.
(eieio-test-dump-trace): New function.
(eieio-test-37-obsolete-name-in-constructor): Use it.
String literals may be shared by the compiler, so the test string
needs to be copied before adding properties to it. For single
properties, just use a string literal with properties.
* test/lisp/emacs-lisp/faceup-tests/faceup-test-basics.el
(faceup-markup): Split into...
(faceup-markup-basics, faceup-markup-escaping, faceup-markup-plain)
(faceup-markup-plain-full-text, faceup-markup-anonymous-face)
(faceup-markup-anonymous-face-2keys, faceup-markup-anonymous-nested)
(faceup-markup-nested, faceup-markup-overlapping)
(faceup-markup-multi-face, faceup-markup-multi-property): New tests.
* lisp/emacs-lisp/cl-macs.el (cl--sm-macroexpand):
Implement Common-Lisp's behavior for symbol-macro's let-rebindings.
(cl--letf, cl-letf): Don't get fooled into using a plain `let` for
symbol-macros.
* test/lisp/emacs-lisp/cl-lib-tests.el (cl-lib-symbol-macrolet-hide):
New test.
* test/lisp/emacs-lisp/subr-x.el (if-let*, if-let): Change Edebug
spec to cause Edebug to instrument tests the results of which are
not bound to symbols (the (VALUEFORM) case).
(and-let*): Change Edebug spec to allow empty body.
*test/lisp/emacs-lisp/subr-x-tests.el:
(subr-x-and-let*-test-group-1): Add missing quote to erroneous
form so Edebug will work on this test.
* lisp/emacs-lisp/cl-macs.el (cl-destructuring-bind): Use
cl-macro-list1 instead of cl-macro-list in Edebug spec.
* lisp/emacs-lisp/edebug.el (edebug-after-dotted-spec): Delete
unused variable.
(edebug-dotted-spec): Add docstring.
(edebug-match-specs): Allow &optional and &rest specs to
match nothing at the tail of a dotted form. Handle matches of
dotted form tails which return non-lists.
* test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-dotted-forms):
New test.
* test/lisp/emacs-lisp/edebug-resources/edebug-test-code.el:
(edebug-test-code-use-destructuring-bind): New function.
7f089aa5f6 Require seq in rmc.el
53aaad1dfc Make an example code introduced in the Gnus info work (bug...
7b29db222f Enable gnus-read-ephemeral-* to run multiple times (bug#29...
015f0bb2d8 Port thread.c to OpenBSD ARM
ad68bbd0da Fix another "wrong side of point" error in CC Mode.
646e56e150 Fix Bug#28959
685fd77959 Fix duplicate .o file on QNX
e562356c3f Fix two js indentation problems
b8cf159bbc Update documentation for windows build
46540a1c7a Fix a "wrong side of point" error in CC Mode. Fixes bug #...
57ca409111 Fix autoload of flymake from elisp-mode during bootstrap (...
aee0bc8775 Fix non-native fullscreen on NS (bug#28872)
d6c1a9cb8a ; Fix author email address in test/lisp/url/url-tramp-test...
761c630766 Fix Bug#28982
628b653209 Fix windows build errors
e8a06a5f9a Fix compile warning for non-w32 builds
0c536a20fb Display commit in package description, if available (Bug#2...
1d83257a1d Port to QNX
19667f44ef * configure.ac: Tweak libcurses diagnostic.
3fc05cfaec Scripts to automate windows binary distribution
928a106939 Fix Edebug specs for map-let and with-maps-do
46f2ee0d4c * test/lisp/net/tramp-tests.el (tramp-test41-delay-load): ...
b51009d7f0 * admin/authors.el (authors-canonical-author-name): Ignore...
a015db90e3 * test/lisp/progmodes/sql-tests.el (sql-tests-postgres-lis...
529a9c09d3 Further work on Bug#28889
c6deabaf4d Improve Tramp backward compatibility
8093e82e42 Improve backward compatibility of tramp-tests.el
46cdc01daa Fix some ‘window-normalize-’ prefixed functions (Bug#28947)
6360611457 Port to OpenIndiana
a012ec766c Don't fill keywords after Emacs Lisp docstring
b7c4aa951c Refactor c-forward-token-2 with new function c-forward-ove...
3aee7be62e Avoid unnecessary rounding errors in timestamps
2bfa42855b Fix xdg timestamp error on 32-bit Emacs
237e96bc52 Test that advice doesn't trigger bytecomp warnings (Bug#28...
d719ea6ad5 Another fix for unsafe directory error message (Bug#865)
b060e091c3 Handle https url for debbugs mbox (Bug#28831)
9e4265ef91 Ignore string properties when saving eshell history (Bug#2...
0f286ca85a Fix Bug#28889
`faceup' is a framework for regression testing of font-lock
keywords in ert. It is based on a human-readable markup
language. (Bug#16063 and bug#28311).
* lisp/emacs-lisp/faceup.el:
* test/lisp/emacs-lisp/faceup-tests/faceup-test-basics.el:
* test/lisp/emacs-lisp/faceup-tests/faceup-test-files.el:
* test/lisp/emacs-lisp/faceup-resources/faceup-test-mode.el:
* test/lisp/emacs-lisp/faceup-resources/faceup-test-this-file-directory.el:
* test/lisp/emacs-lisp/faceup-resources/files/test1.txt:
* test/lisp/emacs-lisp/faceup-resources/files/test1.txt.faceup:
New files.