Some improvements when running in a terminal

This commit is contained in:
Jeremy Dormitzer 2019-01-29 17:54:34 -05:00
parent 33f15a2d38
commit f1ab04d41c

View File

@ -659,6 +659,7 @@ Always show inline images:
(general-def 'normal org-mode-map "K" #'org-move-subtree-up) (general-def 'normal org-mode-map "K" #'org-move-subtree-up)
(general-def 'normal org-mode-map "J" #'org-move-subtree-down) (general-def 'normal org-mode-map "J" #'org-move-subtree-down)
(general-def 'normal org-mode-map "<return>" #'org-return) (general-def 'normal org-mode-map "<return>" #'org-return)
(general-def 'normal org-mode-map "TAB" #'org-cycle)
(general-def org-mode-map "C-c e" #'org-preview-latex-fragment) (general-def org-mode-map "C-c e" #'org-preview-latex-fragment)
(general-def "C-c l" #'org-store-link) (general-def "C-c l" #'org-store-link)
#+END_SRC #+END_SRC
@ -839,19 +840,20 @@ A function to load a font, including overriding any theme settings for org-mode
(intern (completing-read "Change face: " (face-list))) (intern (completing-read "Change face: " (face-list)))
(completing-read "Load font: " (font-family-list)) (completing-read "Load font: " (font-family-list))
(read-minibuffer "Font height: " "120"))) (read-minibuffer "Font height: " "120")))
(if (not (number-or-marker-p height)) (when (display-graphic-p)
(error "Height must be a number.") (if (not (number-or-marker-p height))
(if (member font (font-family-list)) (error "Height must be a number.")
(if (member face (face-list)) (if (member font (font-family-list))
(let ((font-alist (if (member face (face-list))
(assq-delete-all face (jdormit/get-font-alist)))) (let ((font-alist
(progn (assq-delete-all face (jdormit/get-font-alist))))
(set-face-attribute face nil :family font :height height) (progn
(persist-variable (set-face-attribute face nil :family font :height height)
'jdormit/font (persist-variable
(cons `(,face (,font ,height)) font-alist)))) 'jdormit/font
(error "Face %s not found." (symbol-name face))) (cons `(,face (,font ,height)) font-alist))))
(error "Font %s not found." font)))) (error "Face %s not found." (symbol-name face)))
(error "Font %s not found." font)))))
(defun jdormit/load-persisted-fonts () (defun jdormit/load-persisted-fonts ()
(let ((fonts (jdormit/get-font-alist))) (let ((fonts (jdormit/get-font-alist)))