Add a default value for kbd-mac-command

This commit is contained in:
Binbin Ye 2019-06-17 00:43:00 +09:00 committed by duianto
parent 1554bdda9f
commit da3c7ee1f7
2 changed files with 7 additions and 3 deletions

View File

@ -2066,6 +2066,8 @@ Other:
- Added ~M-s-h~ to hide other windows (thanks to Bas Veeling)
- Replace pbcopy by osx-clipboard (thanks to Minh Nguyen-Hue)
- Fixed key binding issue when Emacs is launched in daemon mode.
- Added the default value =H-= (hyper) to =kbd-mac-command= if it's neither:
=hyper=, =super= or =alt= (thanks to Binbin Ye)
**** Pandoc
- Fixed =spacemacs/run-pandoc= not to reset =pandoc--local-settings=
(thanks to martian-f)

View File

@ -52,13 +52,15 @@ such as \"H-f\", \"s-f\", or \"A-f\" depending on the value of
`mac-commmand-modifier' which could be `hyper', `super', or `alt'.
KEYS with a string of \"C-f\" are also valid and will be turned into
values such as \"H-C-f\".
Returns nil if `mac-command-modifier' is set to `none' or something
other than the three sane values listed above."
if `mac-command-modifier' is set to `none' or something other than
the three sane values listed above, bind to `H-' by default"
(let ((found (assoc mac-command-modifier
'((hyper . "H-")
(super . "s-")
(alt . "A-")))))
(when found (kbd (concat (cdr found) keys)))))
(if found
(kbd (concat (cdr found) keys))
(kbd (concat "H-" keys)))))
;; Keybindings
(global-set-key (kbd-mac-command "=") 'spacemacs/scale-up-font)