From 81a503f252061a638a7b722577f728b028bdbefb Mon Sep 17 00:00:00 2001 From: Martin Polden Date: Mon, 24 Jul 2023 23:25:39 +0200 Subject: mac: skip keyboard configuration when using mac port Special config is unnecessary when using Mac port. --- lisp/init-mac.el | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'lisp') diff --git a/lisp/init-mac.el b/lisp/init-mac.el index 1b44ed8..cbd1f81 100644 --- a/lisp/init-mac.el +++ b/lisp/init-mac.el @@ -2,20 +2,23 @@ ;;; Commentary: ;;; Code: -;; configure modifiers -(setq mac-option-modifier 'super) +;; use command as meta (setq mac-command-modifier 'meta) -(setq ns-function-modifier 'hyper) - -;; Norwegian mac-keyboard -(define-key key-translation-map (kbd "s-8") (kbd "[")) -(define-key key-translation-map (kbd "s-(") (kbd "{")) -(define-key key-translation-map (kbd "s-9") (kbd "]")) -(define-key key-translation-map (kbd "s-)") (kbd "}")) -(define-key key-translation-map (kbd "s-7") (kbd "|")) -(define-key key-translation-map (kbd "s-/") (kbd "\\")) -(define-key key-translation-map (kbd "M-s-7") (kbd "M-|")) -(define-key key-translation-map (kbd "s-ยจ") (kbd "~")) + +;; keyboard configuration when not using mac port +(unless (featurep 'mac) + ;; configure modifiers + (setq mac-option-modifier 'super) + (setq ns-function-modifier 'hyper) + + ;; Norwegian mac-keyboard + (define-key key-translation-map (kbd "s-8") (kbd "[")) + (define-key key-translation-map (kbd "s-(") (kbd "{")) + (define-key key-translation-map (kbd "s-9") (kbd "]")) + (define-key key-translation-map (kbd "s-)") (kbd "}")) + (define-key key-translation-map (kbd "s-7") (kbd "|")) + (define-key key-translation-map (kbd "s-/") (kbd "\\")) + (define-key key-translation-map (kbd "M-s-7") (kbd "M-|"))) ;; disable native tabs (setq mac-frame-tabbing nil) -- cgit v1.2.3