emacs-devel
[Top][All Lists]
Advanced

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

Re: [Emacs-diffs] master 9ffb6ce 5/5: Quoting fixes in lisp/internationa


From: Stefan Monnier
Subject: Re: [Emacs-diffs] master 9ffb6ce 5/5: Quoting fixes in lisp/international and lisp/leim
Date: Thu, 03 Sep 2015 10:34:25 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

>> W.r.t ambiguity, the main problem I see is that we currently can never
>> be sure that when we see a ` followed by a ' the two actually form a pair.
>> A human usually can tell, but a program can't get it right 100% of the time.
> Okay.  But then, there's no problem in using the same quoting for key
> sequences, aside from the quote-matching algorithm.

I'm not fundamentally opposed to it, but I'd like the rule to be *simple*.

If we try and accommodate key sequences, I'm afraid the rule will become
too complex, and we'll bump into corner cases like how to
quote key sequences like C-x ' or M-`.  In most cases, there shouldn't
be key sequences in docstrings anyway since we should use \\[...]
instead, so there's no strong need to accommodate quoting of key sequences.

>> Not sure I want to go down that road.  What about `(foo 'a 'b)' ?
> That, too.  At least if this quote-matching logic is implemented in Elisp,
> forward-sexp can take care of skipping the spaces.

Yes, again it can be made to work.  But what it boils down to is this:
- `...' can't handle all cases without breaking existing uses, so we'll
  need another quoting mechanism anyway.
- in most cases, I don't see a strong need to quote code like (foo a b).
  Maybe at some point we'll start doing things like "prettifying" the
  code in docstrings, at which point we'll need it to be quoted, but
  until that happens, the cost/benefit tradeoff is in favor of keeping
  the code unquoted.
- so I don't see a strong need to accommodate quoting like `(foo a b)'.
  If the simple rule we devise happens to allow it, that's fine,
  of course.


        Stefan



reply via email to

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