# HG changeset patch # User Oleksandr Gavenko # Date 1473595601 -10800 # Node ID 8380f91bc913527e20e569af50fcb9c7d4c577fb # Parent f918516ffeb0f9d2ae6e76601c5765ea473c9166 Make possible to move through English word pronunciation with single forward-word. diff -r f918516ffeb0 -r 8380f91bc913 .emacs-my --- a/.emacs-my Sun Sep 11 11:37:20 2016 +0300 +++ b/.emacs-my Sun Sep 11 15:06:41 2016 +0300 @@ -853,7 +853,7 @@ (setq show-paren-style (quote parenthesis)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(message "keyboard, mouse") +(message "input method") (setq mouse-yank-at-point t) @@ -884,6 +884,28 @@ (global-set-key (kbd "C-\\") 'my-toggle-input-method) +;; I found this more quick method to allow `forward-word' across pronunciation +;; as a whole word. +(defconst my/ipa-chars (list ?ˈ ?ˌ ?ː ?ǁ ?ʲ ?θ ?ð ?ŋ ?ɡ ?ʒ ?ʃ ?ʧ ?ə ?ɜ ?ɛ ?ʌ ?ɒ ?ɔ ?ɑ ?æ ?ʊ ?ɪ)) +(mapc (lambda (ch) + (aset char-script-table ch 'latin) + (modify-syntax-entry ch "w")) + my/ipa-chars) +;; Another option is to invent new category: +;; +;; (defconst my/ipa-chars (list ?ˈ ?ˌ ?ː ?ǁ ?ʲ ?θ ?ð ?ŋ ?ɡ ?ʒ ?ʃ ?ʧ ?ə ?ɜ ?ɛ ?ʌ ?ɒ ?ɔ ?ɑ ?æ ?ʊ ?ɪ)) +;; (define-category ?p "Phonetic") +;; (mapc (lambda (ch) +;; (cond +;; ((eq (aref char-script-table ch) 'phonetic) +;; (modify-category-entry ch ?p) +;; (modify-category-entry ch ?l nil t)) +;; ((eq (aref char-script-table ch) 'latin) ; (aref char-script-table ?ˌ) is 'latin but (char-category-set ?ˌ) is ".j" +;; (modify-category-entry ch ?l)))) +;; my/ipa-chars) +;; (add-to-list 'word-combining-categories '(?p . ?l)) +;; (add-to-list 'word-combining-categories '(?l . ?p)) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (message "mouse")