From the manual 'Documentation Tips':
If a symbol has a function definition and/or a variable definition,
but those are irrelevant to the use of the symbol that you are
documenting, you can write the words ‘symbol’ or ‘program’ before
the symbol name to prevent making any hyperlink.
Add symbol properties to -first-item so the byte-compiler compiles
calls to the car opcode. This ensures that -first-item has the same
performance as car.
For example, given the following function:
(defun wh/call-first-item (x)
(-first-item x))
This would compile to:
byte code for wh/call-first-item:
args: (arg1)
0 constant -first-item
1 stack-ref 1
2 call 1
3 return
Whereas it now compiles to:
byte code for wh/call-first-item:
args: (arg1)
0 dup
1 car
2 return
With a symbol, only the file providing the feature triggers the
eval-after-load. With a string, any file named the same way triggers
it. This is problematic for custom configurations named after
packages.
`gv-define-simple-setter` is not defined on Emacs 23, so we need to use
the macro `defsetf` on Emacs 23. `defsetf` is not autoloaded, so we must
require 'cl before using it. We don't need to load 'cl on later Emacs
versions.
However, the whole form is macro-expanded on all Emacs versions. Emacs
24+ assumes that `(defsetf ...)` is a function call because it hasn't
loaded 'cl. This generates byte-compile warnings about unused variables
and nonexistent functions, so silence those.
Otherwise, Emacs cannot show helpful signatures, and just uses ARG1 ARG2
instead.
For example, prior to this change, `-drop` was described as:
-drop is an alias for `nthcdr' in `dash.el'.
(-drop ARG1 ARG2)
Return the tail of LIST without the first N items.
Adding the declaration (pure t) enables the byte-compiler to evaluate
calls at compile-time. Adding the declaration (side-effect-free t)
allows the byte-compiler to remove calls entirely if the result is not
used.
For functions that take a predicate as an argument, we cannot know
whether that predicate is pure, so we do not annotate those.
We also don't annotate functions that depend on `-compare-fn`, as that
may change at runtime.
Fixes#198.
Given an elisp expression of the form:
(->> (+ 1 1)
(+ 2)
(* 3)
(format "%s"))
Edebug now knows that the first argument is an expression, so users can
step through it. This is an improvement over the current situation,
where users cannot step through any part of a threaded form.
Note that this debugging behaviour matches thread-first in Emacs 25:
http://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/emacs-lisp/subr-x.el?id=emacs-25.0.95#n49