1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

∑Ω∂§… EmacsでMacOSXの環境・機種依存文字を一時的に有効にする

Posted at

C-c C-c C-qと打つと一時的に次のような文字をOption/Altキーと組み合わせることで入力できるようにします。もう一度C-c C-c C-qで通常のOption/Altキーに戻します。

åß∂ƒ©˙∆˚¬…æ
Ω≈ç√∫~µ≤≥÷
œ∑´®†¥¨ˆøπ“‘
¡™£¢∞§¶•ªº–≠«

使う場面があるとは思えませんが...

(defvar mac-modifier-stock mac-option-modifier)
(defun mac-special-character-toggle ()
  (interactive)
  (if (eq mac-modifier-stock mac-option-modifier)
      (progn
        (message "Mac Special Character ON")
        (setq mac-option-modifier nil))
    (message "Mac Special Character OFF")
    (setq mac-option-modifier mac-modifier-stock)))

(global-set-key (kbd "C-c C-c C-q") 'mac-special-character-toggle)

右側のOption/Altキーだけに適応させたい場合は次のようにします。

(defvar mac-modifier-stock mac-right-option-modifier)
(defun mac-special-character-toggle ()
  (interactive)
  (if (eq mac-modifier-stock mac-right-option-modifier)
      (progn
        (message "Mac Special Character ON")
        (setq mac-right-option-modifier nil))
    (message "Mac Special Character OFF")
    (setq mac-right-option-modifier mac-modifier-stock)))

(global-set-key (kbd "C-c C-c C-q") 'mac-special-character-toggle)
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?