Use EMACS28+ and add emacs-mac source code link

This commit is contained in:
Gerry Agbobada 2020-04-27 11:11:41 +02:00 committed by Gerry Agbobada
parent a897492b99
commit 4cae60014e
No known key found for this signature in database
GPG key ID: BE26DBAFD866BE34

View file

@ -167,7 +167,7 @@ Otherwise it sets the buffer-local composition table to a composition table enha
(use-package! composite (use-package! composite
;; Starting from emacs "28" because this code breaks without fe903c5 ;; Starting from emacs "28" because this code breaks without fe903c5
:when (and (version<= "28.0" emacs-version) (string-match-p "HARFBUZZ" system-configuration-features)) :when (and EMACS28+ (string-match-p "HARFBUZZ" system-configuration-features))
:init :init
(defvar composition-ligature-table (make-char-table nil)) (defvar composition-ligature-table (make-char-table nil))
:config :config
@ -177,12 +177,14 @@ Otherwise it sets the buffer-local composition table to a composition table enha
(set-char-table-parent composition-ligature-table composition-function-table)) (set-char-table-parent composition-ligature-table composition-function-table))
;; The emacs-mac build of Emacs appear to have built-in support for ligatures, ;; The emacs-mac build of Emacs appear to have built-in support for ligatures,
;; using the same composition-function-table method
;; https://bitbucket.org/mituharu/emacs-mac/src/26c8fd9920db9d34ae8f78bceaec714230824dac/lisp/term/mac-win.el?at=master#lines-345:805
;; so use that instead if this module is enabled. ;; so use that instead if this module is enabled.
(cond ((and IS-MAC (fboundp 'mac-auto-operator-composition-mode)) (cond ((and IS-MAC (fboundp 'mac-auto-operator-composition-mode))
(mac-auto-operator-composition-mode)) (mac-auto-operator-composition-mode))
;; Harfbuzz builds do not need font-specific ligature support ;; Harfbuzz builds do not need font-specific ligature support
;; if they are above emacs-27 ;; if they are above emacs-27
((and (version<= "28.0" emacs-version) ((and EMACS28+
(string-match-p "HARFBUZZ" system-configuration-features) (string-match-p "HARFBUZZ" system-configuration-features)
(not (null +prog-ligatures-modes))) (not (null +prog-ligatures-modes)))
nil) nil)