Emacs/OSX Default font setting does not persist

前端 未结 3 1465
长发绾君心
长发绾君心 2021-02-13 12:28

I\'m using Emacs 23.2. When I change the default font using Options --> Set Default Font... it correctly switches to the font that I select. I then do Options --> Save Options t

相关标签:
3条回答
  • 2021-02-13 12:38

    Try M-x customize-face RET default, adjust to your liking, then 'Save for future sessions'.

    Edit: For example, that adds the following stanza to my (custom-set-faces) in .emacs:

    (custom-set-faces
      '(default ((t (:inherit nil :stipple nil :background "White" :foreground "Black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 130 :width normal :family "Consolas"))))
      ...
    

    If all you want to so is set the font size & family (13pt Consolas in this example), this appears to be sufficient:

      '(default ((t (:height 130 :family "Consolas"))))
    
    0 讨论(0)
  • 2021-02-13 12:49

    I have the same issue. I think it is because Emacs do not have the permission to edit the custom.el, this file is read only in emacs. So I use sudo vim ~/.emacs.d/custom.el to edit it, and it work well.

    0 讨论(0)
  • 2021-02-13 12:53

    Only way I got it to work was to modify manually the .emacs file:

    (custom-set-faces                                                                                    
     '(default ((t (:height 150 :family "Menlo"))))
     )
    

    PS: I'm on Yosemite

    0 讨论(0)
提交回复
热议问题