unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* A simple solution to "Upcoming loss of usability ..."
@ 2015-06-25 14:59 Oleh Krehel
  2015-06-25 15:37 ` Dmitry Gutov
  2015-06-25 16:36 ` Paul Eggert
  0 siblings, 2 replies; 51+ messages in thread
From: Oleh Krehel @ 2015-06-25 14:59 UTC (permalink / raw)
  To: emacs-devel


Hi all,

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):

(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)
      "’")))))

The above code can also be made part of `prettify-symbols-mode', and
some customization can be added to turn things on or off. The above code
is only a rough draft, it may not be optimal, which the experts could
quickly fix. But it works for all Emacs versions installed on my system.

The advantages of the above approach:

1. Paul's students get to see the pretty quotes.

2. The Emacs sources need not be changed, no new syntax definitions need
to be introduced.

3. The pretty quotes are easy to input for Paul's students: they're
right there on the standard issue keyboard, available with zero modifier
keys: even the Shift modifier isn't necessary.

4. Zero problems in the terminal and with copy pasting: that part of
`prettify-symbols-mode' could be just disabled for terminals that don't
support Unicode. In addition, I can actually see the Unicode quotes fine
in GNOME Terminal. They look garbled on a TTY, but again: the minor mode
can be enabled/disabled conditionally.

5. The quotes stay what they are: markup, as they were intended to be.
The markup can be rendered in many different ways, including as Unicode
quotes, if the user prefers.

regards,
Oleh



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

end of thread, other threads:[~2015-08-02 19:16 UTC | newest]

Thread overview: 51+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-25 14:59 A simple solution to "Upcoming loss of usability ..." Oleh Krehel
2015-06-25 15:37 ` Dmitry Gutov
2015-06-25 16:36 ` Paul Eggert
2015-06-25 17:00   ` Oleh Krehel
2015-06-25 20:48     ` Paul Eggert
2015-06-25 21:10       ` Dmitry Gutov
2015-06-25 22:15         ` Paul Eggert
2015-06-25 22:25           ` Dmitry Gutov
2015-06-25 22:41             ` Paul Eggert
2015-06-25 22:52               ` Dmitry Gutov
2015-06-27 15:00         ` raman
2015-06-25 18:32   ` Dmitry Gutov
2015-06-25 22:17     ` Paul Eggert
2015-06-25 22:38       ` Dmitry Gutov
2015-06-26  2:35         ` Paul Eggert
2015-06-26 12:06           ` Dmitry Gutov
2015-06-27 17:28             ` Paul Eggert
2015-06-27 17:53               ` Dmitry Gutov
2015-06-27 21:09                 ` Paul Eggert
2015-06-28  1:04                   ` Dmitry Gutov
2015-06-28 15:20                     ` Paul Eggert
2015-06-28 20:27                       ` Escaping quotes in docstrings, Was: " Dmitry Gutov
2015-06-28 23:29                         ` Dmitry Gutov
2015-07-01  2:56                           ` Paul Eggert
2015-07-02  0:09                             ` Dmitry Gutov
2015-07-02  6:57                               ` Paul Eggert
2015-07-02  9:46                                 ` Dmitry Gutov
2015-07-06  6:12                                 ` Paul Eggert
2015-07-06 12:07                                   ` Dmitry Gutov
2015-07-06 16:30                                     ` Paul Eggert
2015-07-06 22:10                                       ` Dmitry Gutov
2015-07-07  7:54                                         ` Paul Eggert
2015-07-07  8:39                                           ` Dmitry Gutov
2015-08-01  1:36                                             ` Paul Eggert
2015-08-01 21:05                                               ` Dmitry Gutov
2015-08-02  6:56                                                 ` Paul Eggert
2015-08-02 12:51                                                   ` Dmitry Gutov
2015-08-02 15:13                                                     ` Paul Eggert
2015-08-02 18:31                                                       ` Dmitry Gutov
2015-08-02  8:49                                                 ` Przemysław Wojnowski
2015-08-02 19:16                                                   ` Drew Adams
2015-06-27 17:57               ` Dmitry Gutov
2015-06-25 23:12       ` João Távora
2015-06-26  7:40       ` Oleh Krehel
2015-06-26 14:54         ` Paul Eggert
2015-06-26 15:03           ` Dmitry Gutov
2015-06-25 20:58   ` Alan Mackenzie
2015-06-25 22:34     ` Paul Eggert
2015-06-25 22:40       ` Dmitry Gutov
2015-06-25 22:45         ` Paul Eggert
2015-06-25 22:55           ` Dmitry Gutov

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).