Dear Bram,

I believe this patch contradicts the spirit of Vim digraphs since Vim 6,
which is expressed in digraph.txt as follows:


    *These are the RFC1345 digraphs for the one-byte characters.  See
    the output of*
    *":digraphs" for the others.  The characters above 255 are only
    available when*
    *Vim was compiled with the |+multi_byte| feature.*

    *EURO*

    *Exception: RFC1345 doesn't specify the euro sign.  In Vim the
    digraph =e was*
    *added for this.  Note the difference between latin1, where the
    digraph Cu is*
    *used for the currency sign, and latin9 (iso-8859-15), where the
    digraph =e is*
    *used for the euro sign, while both of them are the character 164,
    0xa4.  For*
    *compatibility with zsh Eu can also be used for the euro sign.*

RFC 1345 has a very special logic behind its digraphs (e.g., the grave
accent is marked by an exclamation mark, so that è is entered as
<C-K>e!, rather than <C-K>e`, ê is entered as <C-K>e> rather then
<C-K>e^, etc), which is very consistent, logical, and mostly - a standard.


I also believe that digraphs that are not defined should prompt an
error, unlike the situation today, when you hit bad combination, the
first character is ignored: For example, if you hit <C-K>ff you get, as
you should, the digraph for the ff ligature, but if you misstype
<C-K>gg, instead of getting an error indication (like zsh does) you
simply get a g.


Finally, I believe that if one is interested in resurrecting Vim 5
digraphs, the solution should be to knowingly source some runtime file
which defines these extra digraphs.


Best,

Zvi.


On 03/01/08 18:54, Bram Moolenaar wrote:

> Patch 7.1.193
> Problem:    Some Vim 5.x digraphs are missing in Vim 7, even though the
>           character pairs are not used. (Philippe de Muyter)
> Solution:   Add those Vim 5.x digraphs that don't conflict with others.
> Files:            src/digraph.c
>
>
> *** ../vim-7.1.192/src/digraph.c      Thu Sep 13 18:25:08 2007
> --- src/digraph.c     Thu Jan  3 17:48:47 2008
> ***************
> *** 1978,1983 ****
> --- 1978,2038 ----
>       {'f', 't', 0xfb05},
>       {'s', 't', 0xfb06},
>   #      endif /* FEAT_MBYTE */
> + 
> +     /* Vim 5.x compatible digraphs that don't conflict with the above */
> +     {'~', '!', 161},        /* ¡ */
> +     {'c', '|', 162},        /* ¢ */
> +     {'$', '$', 163},        /* £ */
> +     {'o', 'x', 164},        /* ¤ - currency symbol in ISO 8859-1 */
> +     {'Y', '-', 165},        /* ¥ */
> +     {'|', '|', 166},        /* ¦ */
> +     {'c', 'O', 169},        /* © */
> +     {'-', ',', 172},        /* ¬ */
> +     {'-', '=', 175},        /* ¯ */
> +     {'~', 'o', 176},        /* ° */
> +     {'2', '2', 178},        /* ² */
> +     {'3', '3', 179},        /* ³ */
> +     {'p', 'p', 182},        /* ¶ */
> +     {'~', '.', 183},        /* · */
> +     {'1', '1', 185},        /* ¹ */
> +     {'~', '?', 191},        /* ¿ */
> +     {'A', '`', 192},        /* À */
> +     {'A', '^', 194},        /* Â */
> +     {'A', '~', 195},        /* Ã */
> +     {'A', '"', 196},        /* Ä */
> +     {'A', '@', 197},        /* Å */
> +     {'E', '`', 200},        /* È */
> +     {'E', '^', 202},        /* Ê */
> +     {'E', '"', 203},        /* Ë */
> +     {'I', '`', 204},        /* Ì */
> +     {'I', '^', 206},        /* Î */
> +     {'I', '"', 207},        /* Ï */
> +     {'N', '~', 209},        /* Ñ */
> +     {'O', '`', 210},        /* Ò */
> +     {'O', '^', 212},        /* Ô */
> +     {'O', '~', 213},        /* Õ */
> +     {'/', '\\', 215},       /* × - multiplication symbol in ISO 8859-1 */
> +     {'U', '`', 217},        /* Ù */
> +     {'U', '^', 219},        /* Û */
> +     {'I', 'p', 222},        /* Þ */
> +     {'a', '`', 224},        /* à */
> +     {'a', '^', 226},        /* â */
> +     {'a', '~', 227},        /* ã */
> +     {'a', '"', 228},        /* ä */
> +     {'a', '@', 229},        /* å */
> +     {'e', '`', 232},        /* è */
> +     {'e', '^', 234},        /* ê */
> +     {'e', '"', 235},        /* ë */
> +     {'i', '`', 236},        /* ì */
> +     {'i', '^', 238},        /* î */
> +     {'n', '~', 241},        /* ñ */
> +     {'o', '`', 242},        /* ò */
> +     {'o', '^', 244},        /* ô */
> +     {'o', '~', 245},        /* õ */
> +     {'u', '`', 249},        /* ù */
> +     {'u', '^', 251},        /* û */
> +     {'y', '"', 255},        /* x XX */
> + 
>       {NUL, NUL, NUL}
>          };
>   
> *** ../vim-7.1.192/src/version.c      Thu Jan  3 16:31:17 2008
> --- src/version.c     Thu Jan  3 17:52:51 2008
> ***************
> *** 668,669 ****
> --- 668,671 ----
>   {   /* Add new patch number below this line */
> + /**/
> +     193,
>   /**/
>
>   

-- 
Dr. Zvi Har'El      mailto:[EMAIL PROTECTED]    Department of Mathematics
tel:+972-54-4227607                  Technion - Israel Institute of Technology
fax:+972-4-8293388  http://www.math.technion.ac.il/~rl/    Haifa 32000, ISRAEL
"If you can't say somethin' nice, don't say nothin' at all." -- Thumper (1942)


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui