瀏覽代碼

Fix warnings from gui stuff when compiling in non gui mode.

cray
Mitch Tishmack 11 年之前
父節點
當前提交
a03ffc638f
共有 1 個文件被更改,包括 22 次插入18 次删除
  1. +22
    -18
      emacs/.emacs.d/emacs.org

+ 22
- 18
emacs/.emacs.d/emacs.org 查看文件

@@ -444,24 +444,28 @@ Basically, never show the tool bar or the scroll bar in gui or tty. In gui its o
Ah Fonts. Let me specify them for gui emacs.

#+BEGIN_SRC emacs-lisp
(when window-system
(require 'cl)
(defun font-candidate (&rest fonts)
"Return first font that matches list of provided fonts."
(with-no-warnings (find-if (lambda (f) (find-font (font-spec :name f))) fonts)))

(set-face-attribute 'default nil :font
(font-candidate '"Pragmata\ Pro-13:weight=normal"
"Source Code Pro-13:weight=normal"
"Menlo-12:weight=normal"
"Monaco-12:weight=normal"
))

(cond (on-linux
(setq interprogram-paste-function 'x-cut-buffer-or-selection-value)
(setq x-select-enable-clipboard t)
)
)
(with-no-warnings
(when window-system
(require 'cl)
(defun font-candidate (&rest fonts)
"Return first font that matches list of provided fonts."
(with-no-warnings (find-if (lambda (f) (find-font (font-spec :name f))) fonts))
)

(set-face-attribute 'default nil :font
(font-candidate '"Pragmata\ Pro-13:weight=normal"
"Source Code Pro-13:weight=normal"
"Menlo-12:weight=normal"
"Monaco-12:weight=normal"
)
)

(when on-linux (
(setq interprogram-paste-function 'x-cut-buffer-or-selection-value)
(setq x-select-enable-clipboard t)
)
)
)
)

#+END_SRC


Loading…
取消
儲存