all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: [Emacs-diffs] master 7a0170d 2/2: Don't put whitespace between open paren and comment in Lisp modes (Bug#19740)
       [not found] ` <20170706025513.40F1C22DC4@vcs0.savannah.gnu.org>
@ 2017-07-06  4:17   ` Stefan Monnier
  2017-07-06 13:00     ` Noam Postavsky
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Monnier @ 2017-07-06  4:17 UTC (permalink / raw
  To: emacs-devel; +Cc: Noam Postavsky

> +(defun lisp-comment-indent ()
> +  "Like `comment-indent-default', but don't put space after open paren."
> +  (let ((pt (point)))
> +    (skip-syntax-backward " ")
> +    (if (eq (preceding-char) ?\()
> +        (cons (current-column) (current-column))

This gives:

    (let (;sf
          (x 3))
      4)

whereas I'd expect to use comment-column here.
IOW we should check that this is a double-semi-colon comment before
applying the new rule.


        Stefan



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

* Re: [Emacs-diffs] master 7a0170d 2/2: Don't put whitespace between open paren and comment in Lisp modes (Bug#19740)
  2017-07-06  4:17   ` [Emacs-diffs] master 7a0170d 2/2: Don't put whitespace between open paren and comment in Lisp modes (Bug#19740) Stefan Monnier
@ 2017-07-06 13:00     ` Noam Postavsky
  0 siblings, 0 replies; 2+ messages in thread
From: Noam Postavsky @ 2017-07-06 13:00 UTC (permalink / raw
  To: Stefan Monnier; +Cc: Emacs developers

On Thu, Jul 6, 2017 at 12:17 AM, Stefan Monnier
<monnier@iro.umontreal.ca> wrote:
>> +(defun lisp-comment-indent ()
>> +  "Like `comment-indent-default', but don't put space after open paren."
>> +  (let ((pt (point)))
>> +    (skip-syntax-backward " ")
>> +    (if (eq (preceding-char) ?\()
>> +        (cons (current-column) (current-column))
>
> This gives:
>
>     (let (;sf
>           (x 3))
>       4)
>
> whereas I'd expect to use comment-column here.
> IOW we should check that this is a double-semi-colon comment before
> applying the new rule.

Oops, good point. Fixed.

[1: 386918f0b8]: 2017-07-06 08:59:32 -0400
  Fix lisp-comment-indent for single-semicolon case
  http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=386918f0b807116051facbe51a2bee342de37841



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

end of thread, other threads:[~2017-07-06 13:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20170706025511.4777.72770@vcs0.savannah.gnu.org>
     [not found] ` <20170706025513.40F1C22DC4@vcs0.savannah.gnu.org>
2017-07-06  4:17   ` [Emacs-diffs] master 7a0170d 2/2: Don't put whitespace between open paren and comment in Lisp modes (Bug#19740) Stefan Monnier
2017-07-06 13:00     ` Noam Postavsky

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.