ui/pretty-code: Added support for PragmataPro font
This commit is contained in:
parent
ee91748613
commit
b8179ca236
4 changed files with 223 additions and 13 deletions
|
@ -44,6 +44,19 @@ font.")
|
|||
"An alist containing a mapping of major modes to its value for
|
||||
`prettify-symbols-alist'.")
|
||||
|
||||
;;;###autodef
|
||||
(defun +pretty-code--correct-symbol-bounds (ligature-alist)
|
||||
"Prepend non-breaking spaces to a ligature.
|
||||
|
||||
This way `compose-region' (called by `prettify-symbols-mode') will use the
|
||||
correct width of the symbols instead of the width measured by `char-width'."
|
||||
(let ((len (length (car ligature-alist)))
|
||||
(acc (list (cdr ligature-alist))))
|
||||
(while (> len 1)
|
||||
(setq acc (cons #X00a0 (cons '(Br . Bl) acc))
|
||||
len (1- len)))
|
||||
(cons (car ligature-alist) acc)))
|
||||
|
||||
;;;###autodef
|
||||
(defun set-pretty-symbols! (modes &rest rest)
|
||||
"Associates string patterns with icons in certain major-modes.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue