unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Shakthi Kannan <shakthimaan@gmail.com>
Cc: 9130@debbugs.gnu.org
Subject: bug#9130: Document Lisp mode fontification for strings after :documentation
Date: Fri, 18 Dec 2015 17:35:33 +0200	[thread overview]
Message-ID: <83oadnwz0a.fsf@gnu.org> (raw)
In-Reply-To: <CABG-yt01poteuLA12ohmBWn9k-og3dR4LpzY6YC2bLgkpdZiYA@mail.gmail.com> (message from Shakthi Kannan on Thu, 17 Dec 2015 22:29:27 +0530)

> Date: Thu, 17 Dec 2015 22:29:27 +0530
> From: Shakthi Kannan <shakthimaan@gmail.com>
> Cc: bug-gnu-emacs@gnu.org
> 
> Attached patch with updated manual, NEWS and docstrings:
> 
> * doc/emacs/display.texi
> * etc/NEWS
> * lisp/emacs-lisp/lisp-mode.el

Thanks.  Some comments below:

> diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi
> index a722ec4..73a5112 100644
> --- a/doc/emacs/display.texi
> +++ b/doc/emacs/display.texi
> @@ -867,6 +867,11 @@ any string or comment.  Therefore, you should avoid placing an
>  open-parenthesis or open-brace in the leftmost column, if it is inside
>  a string or comment.  @xref{Left Margin Paren}, for details.
>  
> +@findex lisp-mode
> +  Documentation of the form (:documentation ``the doc string'') now
> +support fontification in Lisp mode. These forms are used in Common
> +Lisp code for CLOS class and slot documentation.

After looking at this node and at several other candidates, I
concluded that there's no place in any manual which should mention
this.  In particular, the node in which you made the change is about
user-level customizations of font-lock, whereas this new feature
cannot be customized on the user level.

In any case, please don't say "now" in the manual -- this is
appropriate for NEWS entries, which are read once when the user
upgrades, but not for a manual which will include the added text from
now on.

> diff --git a/etc/NEWS b/etc/NEWS
> index 2788f5c..2e0ea44 100644
> --- a/etc/NEWS
> +++ b/etc/NEWS
> @@ -631,7 +631,12 @@ respectively, `show-paren-when-point-inside-paren' or
>  `show-paren-when-point-in-periphery'.
>  
>  ** Lisp mode
> +
> ++++
>  *** Strings after `:documentation' are highlighted as docstrings.

Therefore, this should now be marked with "---", not "+++".

> diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
> index 9ce0dfd..446afb5 100644
> --- a/lisp/emacs-lisp/lisp-mode.el
> +++ b/lisp/emacs-lisp/lisp-mode.el
> @@ -486,6 +486,7 @@ This will generate compile-time constants from BINDINGS."
>    "Default expressions to highlight in Lisp modes.")
>  
>  (defun lisp-string-in-doc-position-p (listbeg startpos)
> +  "Returns true if Lisp string is in docstring position"

We use 'nil' and 'non-nil' for false and true.

Also, the doc string should explain the meaning of the function
arguments.  By contrast, you just say "string" and don't explain how
that string relates to LISTBEG and STARTPOS.

Finally, just say "string", there's no need to add "Lisp" -- this is
Lisp code, after all, so every string is a Lisp string.

Could you fix the patch along these lines and resubmit, please?

Thanks in advance.





  reply	other threads:[~2015-12-18 15:35 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-20 16:50 bug#9130: 23.3; Lisp mode doc string enhancment Robert Brown
2011-08-02 20:01 ` Stefan Monnier
2014-03-25 17:54   ` Robert Brown
2014-06-19 14:04     ` bug#9130: 23.3; Lisp mode doc string enhancement Stefan Monnier
2015-12-16 17:10 ` bug#9130: Document Lisp mode fontification for strings after :documentation Shakthi Kannan
2015-12-16 17:53   ` Eli Zaretskii
2015-12-16 18:07     ` Shakthi Kannan
2015-12-16 18:47       ` Eli Zaretskii
2015-12-16 18:54         ` Shakthi Kannan
2015-12-16 18:56           ` Eli Zaretskii
2015-12-17 16:59             ` Shakthi Kannan
2015-12-18 15:35               ` Eli Zaretskii [this message]
2015-12-18 15:58                 ` Shakthi Kannan
2015-12-18 16:10                   ` Eli Zaretskii
2015-12-30  6:22 ` Shakthi Kannan
2015-12-30 18:02   ` Eli Zaretskii
2015-12-31  0:09     ` Xue Fuqiao
2015-12-31  5:32       ` Shakthi Kannan

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83oadnwz0a.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=9130@debbugs.gnu.org \
    --cc=shakthimaan@gmail.com \
    /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 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).