gnu-emacs-sources
[Top][All Lists]
Advanced

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

displaying ASCII substitutions for UCS characters


From: Ivan Shmakov
Subject: displaying ASCII substitutions for UCS characters
Date: Wed, 08 Dec 2010 15:54:03 -0000
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)

        It may seem strange, but I've found myself being such an
        old-fashioned person, so I cannot switch from my Linux-based
        text-mode koi8-r character cell terminal to an Unicode-capable
        one.  Alas, world goes Unicode and I should follow.  Here's the
        code that now helps me.  Perhaps, it could be of some use to
        somebody else.

(mapc (lambda (l)
        (let ((window-system t))        ; FIXME: huh?
          (standard-display-underline (decode-char 'ucs (car l))
                                      (cadr l))))
      '((#x00ab ?<)     ; LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
        (#x00bb ?>)     ; RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
        (#x00d7 ?x)     ; MULTIPLICATION SIGN
        (#x03bc ?u)     ; GREEK SMALL LETTER MU
        (#x03c0 ?p)     ; GREEK SMALL LETTER PI
        (#x2009 ?,)     ; THIN SPACE
        (#x2013 ?-)     ; EN DASH
        (#x2014 ?-)     ; EM DASH
        (#x2018 ?`)     ; LEFT SINGLE QUOTATION MARK
        (#x2019 ?')     ; RIGHT SINGLE QUOTATION MARK
        (#x201c ?\")    ; LEFT DOUBLE QUOTATION MARK
        (#x201d ?\")    ; RIGHT DOUBLE QUOTATION MARK
        (#x2026 ?_)     ; HORIZONTAL ELLIPSIS
        (#x2039 ?<)     ; SINGLE LEFT-POINTING ANGLE QUOTATION MARK
        (#x203a ?>)     ; SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
        (#x2190 ?<)     ; LEFTWARDS ARROW
        (#x2191 ?^)     ; UPWARDS ARROW
        (#x2192 ?>)     ; RIGHTWARDS ARROW
        (#x2193 ?v)     ; DOWNWARDS ARROW
        (#x2212 ?-)     ; MINUS SIGN
        ; (#x2227 ?^)     ; LOGICAL AND
        ; (#x2228 ?v)     ; LOGICAL OR
        (#x2227 ?&)     ; LOGICAL AND
        (#x2228 ?|)     ; LOGICAL OR
        ))

        The Unicode characters that I find particularly useful are
        (beyond ASCII and Cyrillic):

«»  nM: –— double: “” single: ‘’ nbsp:   \,:  
degree: ° bullet: • hellip: … lsquo/rsquo: ‹, ›
pi: π mu: μ
mult: × \pm: ± \mp: ∓ \(-\): − logand: ∧ logior: ∨ r/arrow: → 

        This particular displaying mode can be disabled with, e. g., M-x
        standard-display-cyrillic-translit RET RET.

-- 
FSF associate member #7257


reply via email to

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