zmacs: add command signatures to describe-function output.

* lib/zile/Cons.lua (Cons:mapconcat): New method. Apply a
function to each element of a Cons list.
(Cons:filter): New method. Filter a Cons list with a predicate
function.
* lib/zmacs/zlc (isname): Predicate function to recognise valid
argument names.
(lambda): Support '&optional' and the like in argument lists,
by filtering using isname() as the Lua arguments are generated.
(defun): If a command signature does not start the existing
docstring text, then use the full full lamba argument list to
generate one, using isname() to choose which elements need to
be upper-cased.
* lib/zmacs/zlisp/bind.zl, lib/zmacs/zlisp/buffer.zl,
lib/zmacs/zlisp/edit.zl, lib/zmacs/zlisp/file.zl,
lib/zmacs/zlisp/help.zl, lib/zmacs/zlisp/killring.zl,
lib/zmacs/zlisp/line.zl, lib/zmacs/zlisp/lisp.zl,
lib/zmacs/zlisp/macro.zl, lib/zmacs/zlisp/marker.zl,
lib/zmacs/zlisp/minibuf.zl, lib/zmacs/zlisp/move.zl,
lib/zmacs/zlisp/registers.zl, lib/zmacs/zlisp/search.zl,
lib/zmacs/zlisp/variables.zl, lib/zmacs/zlisp/window.zl:
Ensure parameter names in `(lambda (args)` match docstring
references.  Correct out-dated docstrings, and remove
texinfo style markup in favour of Emacs docstring syntax.
* lib/zmacs/zmacs.mk (lib/zmacs/commands.lua): Also regenerate
if zlc has been changed.
* NEWS: Update.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
zmacs: spell keyboard_quite correctly!

* lib/zmacs/zlisp/registers.zl (copy-to-register)
(insert-register): s/keyboard_quite/keyboard_quit/.
* lib/zz/commands/registers.lua (copy_to_register)
(insert_register): Likewise.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
registers: factor out of zile and into individual editors.

The shared register helper functions in zile are too tightly
coupled with the editor functions to be useful alone.
* lib/zile/registers.lua (regs, register_isempty, register_store)
(regnum, write_registers_list): Move from here...
* lib/zz/commands/registers.lua, lib/zmacs/zlisp/registers.zl:
...to here.
* lib/zile/registers.lua: Remove.
* lib/zile/zile.mk (dist_pkgdata_DATA): Adjust.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
zile: factor out `texi()` function.

* lib/zmacs/eval.lua (Defun, Defvar): Now that we have no texi
markup in docstrings, no need to call texi() any more.
* lib/zile/lib.lua (texi): Move from here...
* lib/zz/eval.lua (texi): ...to here.  It's not used anywhere
else now.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
zmacs: factor out where_is helper function.

* lib/zmacs/zlisp/bind.zl (gather_bindings, where-is): Move
binding collection from here...
* lib/zmacs/bind.lua: New file.  ...to here.
* lib/zmacs/zmacs.mk (dist_zmacsdata_DATA): Adjust.
* lib/zz/commnads/bind.lua, lib/zz/bind.lua, lib/zz/zz.mk: And
again!

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
zmacs: show current bindings in describe-function output.

* lib/zmacs/zlisp/help.zl (write_function_description): If there
are any current key bindings for this function, list them.
* lib/zz/commands/help.lua: And again!
* NEWS: Update.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
zmacs: report source file in describe-* function output.

* lib/zmacs/eval (Defun, Defvar): Add a new 'source' parameter,
and record it in the symbol plist.
* lib/zmacs/zlc (defun, defvar): Generate the additional 'source'
parameter.
* lib/zmacs/zlisp/help.zl (describe-function, describe-key)
(describe-variable): Report the source file when present in the
appropriate symbol plist.
* tests/describe-function.el, tests/describe-function.output,
tests/describe-key.el, tests/describe-key.output,
tests/describe-variable.el, tests/describe-variable.output,
tests/interactive/describe-function.el,
tests/interactive/describe-function.output,
tests/interactive/describe-key.el,
tests/interactive/describe-key.output,
tests/interactive/describe-variable.el,
tests/interactive/describe-variable.output: Adjust.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
zmacs: expand \\[command-name] references in docstrings.

* lib/zmacs/zlisp/help.zl (expand_kbd_refs): Replace and
\\[command-name] with the first key-binding found that invokes
command-name when displaying docstrings.
(write_function_description, write_key_description)
(write_variable_description): Use it.
* NEWS: Update.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
slingshot: sync with upstream, for rockspecs in $buildreq.

* slingshot: Sync with upstream.
* bootstrap: Sync with slingshot.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
configury: require a specific LDoc, to match doc-comments.

* bootstrap.conf (buildreq): Add gvvaughan/ldoc-next-1.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>