guix-devel
[Top][All Lists]
Advanced

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

Re: Don't change "+" syntax in guix/.dir-locals.el


From: Alex Kost
Subject: Re: Don't change "+" syntax in guix/.dir-locals.el
Date: Wed, 23 May 2018 20:21:53 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Ludovic Courtès (2018-05-23 14:33 +0200) wrote:

> Hello!
>
> Alex Kost <address@hidden> skribis:
>
>> Pierre Neidhardt (2018-05-20 21:57 +0200) wrote:
>>
>>> I recently noticed that guix-devel-mode misbehaved on packages ending
>>> with a "+" (like my recent emacs-image+).
>>>
>>> See https://github.com/alezost/guix.el/issues/24 for more details.
>>>
>>> Alex Kost suggested we removed the syntax change in .dir-locals.el:
>>>
>>>    ;; This notably allows '(' in Paredit to not insert a space when the
>>>    ;; preceding symbol is one of these.
>>>    (eval . (modify-syntax-entry ?~ "'"))
>>>    (eval . (modify-syntax-entry ?$ "'"))
>>> -  (eval . (modify-syntax-entry ?+ "'"))
>>
>> Here is my point: I believe (re-search-forward "\\s_" nil t) should find
>> "+" character in lisp/scheme modes because it may be part of symbol
>> names there.  Even elisp manual mentions this fact:
>>
>> https://www.gnu.org/software/emacs/manual/html_node/elisp/Syntax-Class-Table.html#Syntax-Class-Table
>>
>> So I think that ".dir-locals.el" shouldn't break this default behavior.
>
> So, IIUC, we may have to sacrifice highlighting of #+ so that
> ‘guix-guile-current-definition’ works well with symbols containing ‘+’,
> right?

Highlighting?  Sorry, I don't understand what you mean: highlighting
will not be effected in any way.  The problem is that those
'modify-syntax-entry' lines in ".dir-locals.el" break the default syntax
table of scheme-mode, so "+", "$" and "~" characters are not considered
to be parts of symbols (variable names in particular), i.e.
(re-search-forward "\\s_" nil t) doesn't find them as it should.

Since you added those lines, you probably know what Paredit problem you
fixed by that (perhaps this problem should be fixed in Paredit itself?)

-- 
Alex



reply via email to

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