[Top][All Lists]

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

Re: Emacs pretest -- electric-pair-mode change

From: João Távora
Subject: Re: Emacs pretest -- electric-pair-mode change
Date: Sat, 05 Apr 2014 00:31:56 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>>                           (if (nth 4 selector-ppss) ; in comment
>>                               (let ((comment-start
>>                                      (progn
>>                                        (goto-char (line-beginning-position))
> Huh?  Shouldn't this use (nth 8 (syntax-ppss))?

Yes, that was a bad mistake. But in comments, we have to
parse-partial-sexp from the comment block's start, not just from (nth 8
(syntax-ppss)), otherwise won't work in multi-line comment
blocks. Though (nth 8 ...) that does play a part too (I guess that's
what you meant)). So I changed the existing `electric-pair--syntax-ppss'
helper to provide that.

So I commited this to trunk, with two new tests for this behaviour in
ruby line-comments and c block-style comments.


reply via email to

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