* lisp/subr.el (lsh): Warn when compiled; recommend `ash`.
* etc/NEWS: Add note.
'(take N LIST)' returns the first N elements of LIST; 'ntake' does
the same but works by modifying LIST destructively.
+---
+** Calling 'lsh' now elicits a byte-compiler warning.
+'lsh' behaves in somewhat surprising and platform-dependent ways for
+negative arguments and is generally slower than 'ash' which should be
+used instead.
+
\f
* Changes in Emacs 29.1 on Non-Free Operating Systems
This function is provided for compatibility. In new code, use `ash'
instead."
+ (declare (compiler-macro
+ (lambda (form)
+ (when (byte-compile-warning-enabled-p 'suspicious 'lsh)
+ (byte-compile-warn-x form "avoid `lsh'; use `ash' instead"))
+ form)))
(when (and (< value 0) (< count 0))
(when (< value most-negative-fixnum)
(signal 'args-out-of-range (list value count)))