* lisp/gnus/gnus-registry.el (gnus-registry-clean-empty)
(gnus-registry-use-long-group-names)
(gnus-registry-max-track-groups, gnus-registry-entry-caching)
(gnus-registry-trim-articles-without-groups):
Remove variables labeled as obsolete since 23.4 that do nothing.
* lisp/allout.el (allout-passphrase-verifier-string)
(allout-passphrase-hint-string):
* lisp/w32-vars.el (w32-list-proportional-fonts):
Remove variables that are unused since Emacs 23.x.
* lisp/emulation/viper-cmd.el, lisp/emulation/viper-keym.el:
* lisp/emulation/viper-util.el, lisp/net/newst-plainview.el:
* lisp/net/newst-treeview.el, lisp/ps-def.el, lisp/vc/ediff.el:
* lisp/vc/ediff-util.el, lisp/vc/ediff-wind.el:
Remove stub declare-function definitions.
It exists since Emacs 22.2, released 10 years ago.
Most of these files are using even newer features, such as
lexical-binding and cl-lib anyway, making the stubs pointless.
* lisp/progmodes/idlw-toolbar.el: No need for cl.
* lisp/progmodes/antlr-mode.el, lisp/progmodes/idlw-shell.el:
* lisp/progmodes/idlwave.el: Replace cl with cl-lib.
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/src/data-tests.el (data-tests-kill-all-local-variables): New test.
* src/buffer.c (swap_out_buffer_local_variables): Remove.
Fuse the body of its loop into that of reset_buffer_local_variables.
(Fkill_buffer, Fkill_all_local_variables): Don't call it any more.
(reset_buffer_local_variables): Make sure the buffer's local binding
is swapped out before removing it from the alist (bug#30846).
Call watchers before actually killing the var.
* src/data.c (Fmake_local_variable): Simplify.
Use swap_in_global_binding to swap out any local binding, instead of
a mix of find_symbol_value followed by messing with where&found.
Don't call swap_in_symval_forwarding since the currently swapped
binding is never one we've modified.
(Fkill_local_variable): Use swap_in_global_binding rather than messing
with where&found to try and trick find_symbol_value into doing the same.
* src/alloc.c (mark_localized_symbol): 'where' can't be a frame any more.
Unchain all dead markers with a single scan of the markers list,
instead of calling the O(N) 'unchain_marker' N times.
(unchain_dead_markers): New function.
(sweep_buffers): Use it.
(gc_sweep): Sweep buffers before markers.
(sweep_misc): Check that markers have been unchained when reclaiming them.
* doc/lispref/variables.texi (Defining Variables)
(Using Lexical Binding):
* doc/lispref/compile.texi (Compiler Errors): Emphasize that omitting
VALUE for `defvar' marks the variable special only locally.
* doc/lispref/variables.texi (Using Lexical Binding): Add example of
using `defvar' without VALUE.
This fixes a bug where a byte-compiler running on 64-bit Emacs
optimized (lsh -1 -1) to #x1fffffffffffffff, an optimization
that is incorrect for .elc files intended for either 32- or
64-bit Emacs. While I was in the neighborhood, I noticed other
glitches in the lists of pure and side-effect-free functions, and
fixed the errors that I found.
* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns):
Move some functions here from side-effect-and-error-free-fns,
since they can now signal errors. The affected functions are
current-time-string, current-time-zone,
line-beginning-position, line-end-position. Rename langinfo
to locale-info. Add logcount. Remove string-to-int.
(side-effect-and-error-free-fns): Remove minibuffer-window, a
function that can signal errors, and that is already in
side-effect-free-fns.
(pure-fns): Remove ash, lsh, and logb, since they are
platform-dependent and .elc files should be
platform-independent. Add %, logand, logcount. Sort.
Clarify what is meant by “pure”.
Fix a portability bug when emacs-module-tests.el is byte-compiled
with a 32-bit Emacs (where #x20000000 evaluates to a
floating-point number) and then is run on a 64-bit Emacs (where
the floating-point number causes a test failure).
* test/src/emacs-module-tests.el (mod-test-sum-test):
Don’t assume #x20000000 can be represented as an Emacs integer.
* lisp/net/tramp.el (tramp-handle-substitute-in-file-name): Drop volume
letter of localname substitution. Reported by Chris Zheng
<chriszheng99@gmail.com>.
* test/lisp/net/tramp-tests.el (tramp-test39-utf8)
(tramp-test39-utf8-with-stat, tramp-test39-utf8-with-perl)
(tramp-test39-utf8-with-ls): Tag the tests as :unstable.
* 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.
* lisp/emacs-lisp/eieio-base.el (eieio-persistent-validate/fix-slot-value):
`object-write' may quote lists inside hash tables and vectors, so
unquote those lists here.
This patch allows the eieio-persistent write/restore process to
perform a clean round trip. It only handles a very specific and
limited range of object structures, but at least the write and read
procedures match.