emacs-devel
[Top][All Lists]
Advanced

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

Re: A simple solution to "Upcoming loss of usability ..."


From: Dmitry Gutov
Subject: Re: A simple solution to "Upcoming loss of usability ..."
Date: Thu, 25 Jun 2015 18:37:11 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0

On 06/25/2015 05:59 PM, Oleh Krehel wrote:

It seems that even though many conservative people disagree, the
"experiment" isn't going away.

So I'm proposing the following change that could satisfy both Paul and
the conservatives (myself included):

I'm not sure it'll satisfy Paul, because he seems intent on introducing actual curly quotes in the Elisp source code. Myself, I'd very much prefer this approach.

(font-lock-add-keywords
  'emacs-lisp-mode
  '(("\\(`\\)\\([a-zA-Z-0-9]+\\)\\('\\)"
     (0
      (compose-region
       (match-beginning 1)
       (match-end 1)
       "‘"))
     (0
      (compose-region
       (match-beginning 3)
       (match-end 3)
       "’")))))

Otherwise, this looks pretty close to the proposed font-lock-only solution in http://lists.gnu.org/archive/html/emacs-devel/2015-06/msg00547.html

And yes, we can add similar font-lock rules in emacs-lisp-mode buffers, but they'll have to handle escaped quotes a bit differently (do not hide the escaping chars).



reply via email to

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