From: Juanma Barranquero <lekktu@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: Re: master 49192e9: Strip "(fn...)" from output of `describe-mode' (bug#38222)
Date: Fri, 22 Nov 2019 21:00:01 +0100 [thread overview]
Message-ID: <CAAeL0SQ51=kj+OhGg_CWtBZzyMCJObgtUWjoi0GAQ9er5B74uw@mail.gmail.com> (raw)
In-Reply-To: <jwvmucr4mf0.fsf-monnier+emacs@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 1349 bytes --]
On Tue, Nov 19, 2019 at 9:56 PM Stefan Monnier <monnier@iro.umontreal.ca>
wrote:
> What I'm suggesting is to look at all the usage we can find and see if
> such a change would break that code. If none is broken, there's a high
> probability that other code we don't know about wouldn't be
> broken either.
After looking at all the code calling help-split-fundoc in our sources (not
ELPA), I'm unconvinced that changing it to return (nil . DOC) when there's
no usage would be a good idea.
Basically, all callers do the moral equivalent of
(let ((ud (help-split-fundoc documentation symbol)))
(if ud
;;; (car ud) or (cdr ud)
and assume that (car ud) and (cdr ud) are strings.
For example, take a look at this code from
semantic-grammar-eldoc-get-macro-docstring:
(let* ((doc (help-split-fundoc (documentation expander t) expander)))
(cond
(doc
(setq doc (car doc))
(string-match "\\`[^ )]* ?" doc)
(setq doc (concat "(" (substring doc (match-end 0)))))
which would set doc to nil and then try to string-match it.
There are ten cases like this just in our sources; each one would require
some bit of tweaking, however small.
A far less intrusive option IMHO would be to add an optional argument
SECTION, with SECTION = nil as it is now, and SECTION 'usage or 'doc
returning only that part.
[-- Attachment #2: Type: text/html, Size: 1948 bytes --]
next prev parent reply other threads:[~2019-11-22 20:00 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20191119101930.28082.63466@vcs0.savannah.gnu.org>
[not found] ` <20191119101931.EA4E2209BF@vcs0.savannah.gnu.org>
2019-11-19 13:54 ` master 49192e9: Strip "(fn...)" from output of `describe-mode' (bug#38222) Stefan Monnier
2019-11-19 18:47 ` Juanma Barranquero
2019-11-19 19:22 ` Stefan Monnier
2019-11-19 19:45 ` Juanma Barranquero
2019-11-19 20:05 ` Stefan Monnier
2019-11-19 20:25 ` Juanma Barranquero
2019-11-19 20:56 ` Stefan Monnier
2019-11-19 21:26 ` Drew Adams
2019-11-22 20:00 ` Juanma Barranquero [this message]
2019-11-22 21:45 ` Stefan Monnier
2019-11-23 21:12 ` Juanma Barranquero
2019-11-23 22:08 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAAeL0SQ51=kj+OhGg_CWtBZzyMCJObgtUWjoi0GAQ9er5B74uw@mail.gmail.com' \
--to=lekktu@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.