unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#30297: 27.0.50; *Help* shows inaccurate arglist for json-parse-string
@ 2018-01-30 23:31 Basil L. Contovounesios
  2018-02-02 10:50 ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Basil L. Contovounesios @ 2018-01-30 23:31 UTC (permalink / raw)
  To: 30297

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: 0001-Fix-arglist-doc-of-json-parse-functions.patch --]
[-- Type: text/x-diff, Size: 1432 bytes --]

From 2ccc2700b2f2386a8792aa0fc1b2146b5c201e79 Mon Sep 17 00:00:00 2001
From: "Basil L. Contovounesios" <contovob@tcd.ie>
Date: Tue, 30 Jan 2018 11:10:14 +0000
Subject: [PATCH] ; Fix arglist doc of json parse functions

* src/json.c (Fjson_parse_string, Fjson_parse_buffer):
Fix "usage:" arglist doc.
---
 src/json.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/json.c b/src/json.c
index 12ba7afa6a..b046d34f66 100644
--- a/src/json.c
+++ b/src/json.c
@@ -740,7 +740,7 @@ object, all but the last one are ignored.  If STRING doesn't contain a
 valid JSON object, an error of type `json-parse-error' is signaled.
 The keyword argument `:object-type' specifies which Lisp type is used
 to represent objects; it can be `hash-table' or `alist'.
-usage: (string &key (OBJECT-TYPE \\='hash-table)) */)
+usage: (json-parse-string STRING &key (OBJECT-TYPE \\='hash-table))  */)
   (ptrdiff_t nargs, Lisp_Object *args)
 {
   ptrdiff_t count = SPECPDL_INDEX ();
@@ -813,7 +813,7 @@ DEFUN ("json-parse-buffer", Fjson_parse_buffer, Sjson_parse_buffer,
 This is similar to `json-parse-string', which see.  Move point after
 the end of the object if parsing was successful.  On error, point is
 not moved.
-usage: (&key (OBJECT-TYPE \\='hash-table))  */)
+usage: (json-parse-buffer &key (OBJECT-TYPE \\='hash-table))  */)
   (ptrdiff_t nargs, Lisp_Object *args)
 {
   ptrdiff_t count = SPECPDL_INDEX ();
-- 
2.15.1


[-- Attachment #2: Type: text/plain, Size: 1229 bytes --]


Seen on latest master:

1. emacs -Q
2. C-h f json-parse-string RET

*Help* reports the following arglist:

  (json-parse-string &key (OBJECT-TYPE 'hash-table))

despite mention of the positional argument STRING in the rest of the
docstring.

Attached is a doc fix suggestion.

Thanks,

-- 
Basil

In GNU Emacs 27.0.50 (build 3, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2018-01-30 built on thunk
Repository revision: 2b0bcbbaa64f95c14deed89fdf279d8be48ee352
Windowing system distributor 'The X.Org Foundation', version 11.0.11905000
System Description: Debian GNU/Linux buster/sid

Quit
Configured using:
 'configure --config-cache --prefix=/home/blc/.local --with-mailutils
 --with-x-toolkit=lucid --with-modules --with-file-notification=yes
 --with-x 'CFLAGS=-flto -fomit-frame-pointer -march=native -maes -mavx
 -mcrc32 -mf16c -mfpmath=sse -mfsgsbase -mfxsr -minline-all-stringops
 -mmmx -mpclmul -mpopcnt -msahf -msse4.2 -mxsave -mxsaveopt -mvzeroupper
 -O2 -pipe' LDFLAGS=-flto'

Configured features:
XAW3D XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS
NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS LUCID X11 MODULES THREADS LIBSYSTEMD JSON LCMS2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-02-03 14:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-30 23:31 bug#30297: 27.0.50; *Help* shows inaccurate arglist for json-parse-string Basil L. Contovounesios
2018-02-02 10:50 ` Eli Zaretskii
2018-02-02 19:43   ` Philipp Stephani
2018-02-03  8:18     ` Eli Zaretskii
2018-02-03 14:18       ` Philipp Stephani

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).