emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[nongnu] elpa/xah-fly-keys 7587eb16e9: Xah Fly Keys. xah-unicode-list ch


From: ELPA Syncer
Subject: [nongnu] elpa/xah-fly-keys 7587eb16e9: Xah Fly Keys. xah-unicode-list changed format. was list of string, now assoc list.
Date: Fri, 21 Jul 2023 19:02:24 -0400 (EDT)

branch: elpa/xah-fly-keys
commit 7587eb16e936bcbaff5c2236cf4d96ce19918f53
Author: Xah Lee <xah@xahlee.org>
Commit: Xah Lee <xah@xahlee.org>

    Xah Fly Keys. xah-unicode-list changed format. was list of string, now 
assoc list.
    The command xah-insert-unicode implementation changed accordingly.
    Added back several keys for commands that insert unicode brackets e.g. 
xah-insert-corner-bracket ใ€Œใ€. These are useful, but unfamiliar to most american 
programers. (i use them to markup text, better than markdown's backtick that 
have problems with code contain it.) might be removed in the future.
---
 xah-fly-keys.el | 169 +++++++++++++++++++++++++++++---------------------------
 1 file changed, 87 insertions(+), 82 deletions(-)

diff --git a/xah-fly-keys.el b/xah-fly-keys.el
index 30852cac7a..9f53d3737c 100644
--- a/xah-fly-keys.el
+++ b/xah-fly-keys.el
@@ -4,7 +4,7 @@
 
 ;; Author: Xah Lee ( http://xahlee.info/ )
 ;; Maintainer: Xah Lee <xah@xahlee.org>
-;; Version: 23.16.20230721120619
+;; Version: 23.12.20230721135940
 ;; Created: 10 Sep 2013
 ;; Package-Requires: ((emacs "24.1"))
 ;; Keywords: convenience, emulations, vim, ergoemacs
@@ -1862,75 +1862,73 @@ Version: 2013-06-12 2019-03-07"
         (beginning-of-line)
         (forward-char xcolpos)))))
 
-(defvar xah-unicode-list
-  '(
-    ;;
-    ("smile beaming ๐Ÿ˜Š")
-    ("tears of joy ๐Ÿ˜‚")
-    ("hug ๐Ÿค—")
-    ("heart eyes ๐Ÿ˜")
-    ("heart face ๐Ÿฅฐ")
-
-    ("angry ๐Ÿ˜ ")
-    ("vomit ๐Ÿคฎ")
-
-    ("thumb up ๐Ÿ‘")
-    ("thumb down ๐Ÿ‘Ž")
-
-    ("checkmark โœ…")
-    ("new ๐Ÿ†•")
-    ("star glowing ๐ŸŒŸ")
-    ("star โญ")
-    ("sparkles โœจ")
-    ("rocket ๐Ÿš€")
-
-    ("sun ๐ŸŒž")
-    ("red heart โค")
-
-    ("clown ๐Ÿคก")
-
-    ("large circle โญ•")
-    ("cross โŒ")
-
-    ("red triangle ๐Ÿ”บ")
-    ("diamond ๐Ÿ’ ")
-    ("square โฌ›")
-    ("cursor โ–ฎ")
-
-    ;; ("double angle bracket ใ€Šใ€‹")
-    ;; ("black-lenticular-bracket ใ€ใ€‘")
-    ;; ("corner-bracket ใ€Œใ€")
-    ;; ("tortoise-shell-bracket ใ€”ใ€•")
-    ;; ("angle-bracket ใ€ˆใ€‰")
-    ;; ("double-angle-quote ยซยป")
-
-    ("bullet โ€ข")
-    ("diamond โ—†")
-    ("...ellipsis โ€ฆ")
-    ("nbsp ย ")
-    ("chinese comma ใ€")
-    ("-emdash โ€”")
-    ("fullwidth ampersand ๏ผ†")
-    ("left arrow โ†")
-    ("right arrow โ†’")
-    ("up arrow โ†‘")
-    ("down arrow โ†“")
-    ;;
-    )
-
-  "A list of strings used by `xah-insert-unicode'.
-Each item is a string.
-The first part of string before last space, is used as name of a unicode char, 
the last part before last space, is the unicode Unicode character to insert. 
(can be more than 1 char).")
+(defvar xah-unicode-list nil
+ "A alist.
+Each item is (prompStr . xString). Used by `xah-insert-unicode'.
+prompStr is used for prompt.
+xString is used for insert a unicode.
+xString can be any string, needs not be a char or emoji.
+")
+
+(setq
+ xah-unicode-list
+ '(
+   ;;
+   ("smile beaming ๐Ÿ˜Š" . "๐Ÿ˜Š")
+   ("tears of joy" . "๐Ÿ˜‚")
+   ("hug ๐Ÿค—" . "๐Ÿค—")
+   ("heart eyes ๐Ÿ˜" . "๐Ÿ˜")
+   ("heart face ๐Ÿฅฐ" . "๐Ÿฅฐ")
+   ("angry ๐Ÿ˜ " . "๐Ÿ˜ ")
+   ("vomit ๐Ÿคฎ" . "๐Ÿคฎ")
+   ("thumb up ๐Ÿ‘" . "๐Ÿ‘")
+   ("thumb down ๐Ÿ‘Ž" . "๐Ÿ‘Ž")
+   ("checkmark โœ…" . "โœ…")
+   ("new ๐Ÿ†•" . "๐Ÿ†•")
+   ("glowing star ๐ŸŒŸ" . "๐ŸŒŸ")
+   ("star โญ" . "โญ")
+   ("sparkles โœจ" . "โœจ")
+   ("rocket ๐Ÿš€" . "๐Ÿš€")
+   ("sun ๐ŸŒž" . "๐ŸŒž")
+   ("red heart โค" . "โค")
+   ("clown ๐Ÿคก" . "๐Ÿคก")
+   ("large circle" . "โญ•")
+   ("cross โŒ" . "โŒ")
+   ("red triangle ๐Ÿ”บ" . "๐Ÿ”บ")
+   ("diamond ๐Ÿ’ " . "๐Ÿ’ ")
+   ("square" . "โฌ›")
+   ("cursor โ–ฎ" . "โ–ฎ")
+
+   ("double angle bracket" . "ใ€Šใ€‹")
+   ("black lenticular bracket" . "ใ€ใ€‘")
+   ("corner-bracket" . "ใ€Œใ€")
+   ("tortoise shell bracket" . "ใ€”ใ€•")
+   ("angle bracket" . "ใ€ˆใ€‰")
+   ("double angle quote" . "ยซยป")
+
+   ("bullet โ€ข" . "โ€ข")
+   ("diamond โ—†" . "โ—†")
+   ("...ellipsis โ€ฆ" . "โ€ฆ")
+   ("nbsp non breaking space" . "ย ")
+   ("chinese comma ใ€" . "ใ€")
+   ("emdash โ€”" . "โ€”")
+   ("fullwidth ampersand ๏ผ†" . "๏ผ†")
+   ("left arrow โ†" . "โ†")
+   ("right arrow โ†’" . "โ†’")
+   ("up arrow โ†‘" . "โ†‘")
+   ("down arrow โ†“" . "โ†“")
+   ;;
+   ))
 
 (defun xah-insert-unicode ()
   "Insert a unicode from a custom list `xah-unicode-list'.
 URL `http://xahlee.info/emacs/emacs/emacs_insert_unicode.html'
-Version: 2021-01-05 2022-04-07 2022-10-30"
+Version: 2021-01-05 2022-10-30 2023-07-21"
   (interactive)
-  (let ((xstr
+  (let ((xkey
          (completing-read
           "Insert:" xah-unicode-list)))
-    (insert (car (last (split-string xstr " " t))))))
+    (insert (cdr (assoc xkey xah-unicode-list)))))
 
 
 ;; text selection
@@ -3057,25 +3055,8 @@ Version 2022-10-31"
 
        ("d" . beginning-of-buffer)
 
-       ;; a b c
-       ("e d" . xah-insert-double-curly-quote) ; โ€œโ€
-       ("e e" . xah-insert-unicode)
-       ;; f
-       ("e g" . xah-insert-ascii-double-quote) ; ""
-       ("e h" . xah-insert-brace)              ; {}
-       ;; i
-       ("e j" . insert-char)
-       ("e k" . xah-insert-markdown-quote)     ; ``
-
-       ;; l m
-       ("e n" . xah-insert-square-bracket) ; []
-       ;; o
-       ("e p" . xah-insert-single-angle-quote) ; โ€นโ€บ
-       ;; q r s
-
-       ("e t" . xah-insert-paren) ; ()
-       ("e u" . xah-insert-date)
-       ("e v" . xah-insert-markdown-triple-quote) ;
+       ("e a" . xah-insert-double-angle-bracket)     ; ใ€Šใ€‹
+       ("e b" . xah-insert-black-lenticular-bracket) ; ใ€ใ€‘
 
        ("e c r" . expand-region-abbrevs)
        ("e c t" . edit-abbrevs)
@@ -3092,6 +3073,30 @@ Version 2022-10-31"
        ("e c n" . expand-jump-to-next-slot)
        ("e c y" . abbrev-prefix-mark)
 
+       ("e d" . xah-insert-double-curly-quote) ; โ€œโ€
+       ("e e" . xah-insert-unicode)
+       ("e f" . xah-insert-emacs-quote)        ; `'
+       ("e g" . xah-insert-ascii-double-quote) ; ""
+       ("e h" . xah-insert-brace)              ; {}
+       ("e i" . xah-insert-curly-single-quote) ; โ€˜โ€™
+       ("e j" . insert-char)
+       ("e k" . xah-insert-markdown-quote) ; ``
+       ("e l" . xah-insert-formfeed)
+       ("e m" . xah-insert-corner-bracket)         ; ใ€Œใ€
+       ("e n" . xah-insert-square-bracket)         ; []
+       ;; o
+       ("e p" . xah-insert-single-angle-quote)    ; โ€นโ€บ
+       ;; q
+       ("e r" . xah-insert-tortoise-shell-bracket) ; ใ€”ใ€•
+       ;; s
+       ("e t" . xah-insert-paren)                  ; ()
+       ("e u" . xah-insert-date)
+       ("e v" . xah-insert-markdown-triple-quote) ;
+       ("e w" . xah-insert-angle-bracket)         ; ใ€ˆใ€‰
+       ;; x
+       ("e y" . xah-insert-double-angle-quote)    ; ยซยป
+       ;; z
+
        ("f" . xah-search-current-word)
        ("g" . xah-save-close-current-buffer)
 



reply via email to

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