Guest User

Untitled

a guest
Jan 21st, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.59 KB | None | 0 0
  1. diff -ur uim-1.7.0.orig/scm/skk-key-custom.scm uim-1.7.0/scm/skk-key-custom.scm
  2. --- uim-1.7.0.orig/scm/skk-key-custom.scm 2011-09-26 12:13:46.000000000 +0900
  3. +++ uim-1.7.0/scm/skk-key-custom.scm 2011-09-26 11:27:53.000000000 +0900
  4. @@ -140,6 +140,12 @@
  5. (N_ "[SKK] cancel")
  6. (N_ "long description will be here"))
  7.  
  8. +(define-custom 'skk-sticky-key '()
  9. + '(skk-keys1)
  10. + '(key)
  11. + (N_ "[SKK] sticky")
  12. + (N_ "long description will be here"))
  13. +
  14. ;;
  15. ;; advanced 1
  16. ;;
  17. diff -ur uim-1.7.0.orig/scm/skk.scm uim-1.7.0/scm/skk.scm
  18. --- uim-1.7.0.orig/scm/skk.scm 2011-09-26 12:13:46.000000000 +0900
  19. +++ uim-1.7.0/scm/skk.scm 2011-09-26 11:27:53.000000000 +0900
  20. @@ -1036,6 +1036,10 @@
  21. (skk-context-set-state! sc 'skk-state-kanji)
  22. (skk-context-set-latin-conv! sc #t)
  23. #f)
  24. + ((skk-sticky-key? key key-state)
  25. + (skk-context-set-state! sc 'skk-state-kanji)
  26. + (skk-context-set-latin-conv! sc #f)
  27. + #f)
  28. ((skk-kanji-mode-key? key key-state)
  29. (skk-context-set-state! sc 'skk-state-kanji)
  30. (skk-context-set-latin-conv! sc #f)
  31. @@ -1140,6 +1144,15 @@
  32. (skk-context-set-latin-conv! sc #t)
  33. #f)
  34. #t)
  35. + (if (and (skk-sticky-key? key key-state)
  36. + (not (rk-expect-key? rkc key-str)))
  37. + (let* ((residual-kana (rk-push-key-last! rkc)))
  38. + (if residual-kana
  39. + (skk-commit sc (skk-get-string sc residual-kana kana)))
  40. + (skk-context-set-state! sc 'skk-state-kanji)
  41. + (skk-context-set-latin-conv! sc #f)
  42. + #f)
  43. + #t)
  44. (if (and (skk-kanji-mode-key? key key-state)
  45. (not (rk-expect-key? rkc key-str)))
  46. (let* ((residual-kana (rk-push-key-last! rkc)))
  47. @@ -1510,6 +1523,16 @@
  48. (skk-begin-conversion sc)
  49. #f)
  50. #t)
  51. + (if (skk-sticky-key? key key-state)
  52. + (if (null? (skk-context-head sc))
  53. + (begin
  54. + (skk-commit sc (charcode->string key))
  55. + (skk-flush sc)
  56. + #f)
  57. + (begin
  58. + (skk-context-set-state! sc 'skk-state-okuri)
  59. + #f))
  60. + #t)
  61. (if (and (skk-ichar-upper-case? key)
  62. (not (null? (skk-context-head sc))))
  63. (let ((key-str (charcode->string (skk-ichar-downcase key))))
  64. @@ -2052,6 +2075,14 @@
  65. #f)
  66. #t)
  67. (begin
  68. + (if (string=? (skk-context-okuri-head sc) "")
  69. + (if (skk-rk-pending? sc)
  70. + (skk-context-set-okuri-head-using-alist!
  71. + sc
  72. + (car (reverse (rk-context-seq rkc))))
  73. + (skk-context-set-okuri-head-using-alist!
  74. + sc
  75. + (charcode->string (skk-ichar-downcase key)))))
  76. (set! res
  77. (rk-push-key!
  78. rkc
Add Comment
Please, Sign In to add comment