Skip to content

Instantly share code, notes, and snippets.

@kikairoya
Last active October 16, 2015 07:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kikairoya/587b83c2aabb586c91f6 to your computer and use it in GitHub Desktop.
Save kikairoya/587b83c2aabb586c91f6 to your computer and use it in GitHub Desktop.
ddskkの挙動が気に食わなかった
(when (require 'skk nil t)
(global-set-key (kbd "C-x j") 'skk-auto-fill-mode)
(global-set-key (kbd "C-x C-j") 'skk-auto-fill-mode)
(setq default-input-method "japanese-skk")
(setq skk-egg-like-newline t)
(defun u-skk-ctrlj-force-hiragana ()
(interactive)
(if (and (boundp 'isearch-mode)
isearch-mode)
nil
(skk-j-mode-on)))
(defun u-skk-ctrlj-hack ()
(when (current-local-map)
(let ((k (lookup-key (current-local-map) "\C-j")))
(when k
(local-set-key (kbd "M-C-j") k))))
(define-key skk-j-mode-map "\C-j" 'u-skk-ctrlj-force-hiragana))
(defun u-skk-isearch-begin ()
(when (and (boundp 'skk-mode)
skk-mode
skk-isearch-mode-enable)
(skk-isearch-mode-setup)))
(defun u-skk-isearch-end ()
(when (and (featurep 'skk-isearch)
skk-isearch-mode-enable)
(skk-isearch-mode-cleanup)))
(add-hook 'isearch-mode-hook 'u-skk-isearch-begin)
(add-hook 'isearch-mode-end-hook 'u-skk-isearch-end)
(add-hook 'skk-mode-hook 'u-skk-ctrlj-hack)
(require 'skk-hint)
(require 'skk-study))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment