emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ELPA] New package: compact-docstrings


From: Clément Pit--Claudel
Subject: Re: [ELPA] New package: compact-docstrings
Date: Wed, 29 Jun 2016 11:12:53 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0

On 2016-06-29 11:00, Artur Malabarba wrote:
> Hi Clément,
> Thanks for this package, it's pretty nice!

:)

> I couldn't get it to work on empty lines inside comments though. I
> set compact-docstrings-only-doc-blocks to nil, and turned on the
> minor-mode, but I don't see any effect on comments (docstrings and
> regular strings work fine).

Hey Artur,

At the moment this option only affects languages with multiline comments, such 
as C++ or OCaml; in Emacs Lisp mode, that option is a no-op :/

> Maybe I misunderstand the scenario? Am I correct in thinking that it
> should shrink the empty line in the following example?
> ```
> ;;; compact-docstrings.el --- Shrink blank lines in docstrings and doc 
> comments
> 
> ;; Copyright (C) 2016 Free Software Foundation, Inc.
> ```

That would be a very nice addition, but it doesn't do it yet. The issue is that 
on that line (syntax-ppss) doesn't tell us that we're in a comment, so we'd 
need more advanced logic to handle this case properly.

A related question is how to handle the following:

;; Some comment:
;; 
;; - a
;; - b
;; - c

In that case the line after "Some comment" isn't even empty; and yet it could 
be nice to shrink it. This case is probably easier to handle than your example 
though.

Clément.

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]