Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm using emacs 23.2.1 with quack on Linux and trying to set my default typeface to Inconsolata Medium 13. It is installed on my system (debian sid) and can be set manually per buffer in emacs.

However, I would like it to be used throughout and by default. My suspicion is that quack's mode is somehow conflicting.

I've searched a good deal looking for information on font customization in emacs. Although there is documentation and examples out there, I've found them fairly incoherent when taken together and nothing specifically addressing this issue.

Here is my .emacs

(set-default-font "Inconsolata-13")

;;; Turn on visible-bell, get rid of beeps
(setq visible-bell t)

;;; Hilight the selected region
(setq transient-mark-mode t)

;;; Get rid of tool-bar
(tool-bar-mode -1)

;;; Show matched parens
(show-paren-mode 1)

;;; Avoid iconizing emacs.
(global-unset-key "\C-z")

;;; Jump to a specific line of the current buffer
(global-set-key "\M-g" 'goto-line)

;;; Tabs are evil?
;;; Use spaces instead of tabs for indentation.
(setq indent-tabs-mode nil) 

;;; Turn on syntax-highlighting.
(global-font-lock-mode t)
(load-library "font-lock")
(setq font-lock-maximum-decoration t)

;;; load xscheme library

(require 'xscheme)

;;; Scheme-specific customization

;;; Load the Quack mode, which is an advanced Scheme mode.
(require 'quack)

;;; Loading/creating a file/buffer whose name ends with '.ss'
;;; automagically switches Emacs to Scheme mode.
(setq auto-mode-alist (cons '("\\.ss" . scheme-mode) auto-mode-alist))

;;; Change the program name string below to point to Petite Chez
;;; Scheme on your machine.  For example, Will uses the string
;;; "/usr/bin/petite" on his laptop running Mac OS X.
(setq scheme-program-name "mit-scheme")

;;; Teach Emacs how to properly indent
;;; certain Scheme special forms
;;; (such as 'pmatch')
(put 'cond 'scheme-indent-function 0)
(put 'for-each 'scheme-indent-function 0)
(put 'pmatch 'scheme-indent-function 1)
(put 'match 'scheme-indent-function 1)
(put 'union-case 'scheme-indent-function 2)
(put 'cases 'scheme-indent-function 1)
(put 'let-values 'scheme-indent-function 1)
(put 'call-with-values 'scheme-indent-function 2)
(put 'syntax-case 'scheme-indent-function 2)
(put 'test 'scheme-indent-function 1)
(put 'test-check 'scheme-indent-function 1)
(put 'test-divergence 'scheme-indent-function 1)
(put 'make-engine 'scheme-indent-function 0)
(put 'with-mutex 'scheme-indent-function 1)
(put 'trace-lambda 'scheme-indent-function 1)
(put 'timed-lambda 'scheme-indent-function 1)
(put 'tlambda 'scheme-indent-function 1)


;;; For folks who like pretty colors on their screens:

(require 'color-theme)
(color-theme-initialize)
(color-theme-dark-blue2)

(if (fboundp 'global-font-lock-mode)
    (global-font-lock-mode 1); Emacs    
    (setq font-lock-auto-fontify t)); XEmacs

(custom-set-variables
  ;; custom-set-variables was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 '(column-number-mode t)
 '(paren-blinking "t" t)
 '(paren-matching t t)
 '(quack-default-program "mit-scheme")
 '(quack-fontify-style (quote emacs))
 '(quack-pltish-fontify-keywords-p t)
 '(quack-pltish-keywords-to-fontify (quote ("and" "begin" "begin0" "c-declare" "c-lambda" "call-with-current-continuation" "call-with-input-file" "call-with-output-file" "call/cc" "case" "case-lambda" "class" "class*" "class*/names" "class100" "class100*" "compound-unit/sig" "cond" "cond-expand" "define" "define-macro" "define-module" "define-public" "define-signature" "define-struct" "define-syntax" "define-syntax-set" "define-values" "define-values/invoke-unit/sig" "define/contract" "define/override" "define/private" "define/public" "delay" "do" "else" "exit-handler" "field" "if" "import" "inherit" "inherit-field" "init" "init-field" "init-rest" "instantiate" "interface" "lambda" "let" "let*" "let*-values" "let+" "let-syntax" "let-values" "let/ec" "letrec" "letrec-values" "letrec-syntax" "match" "match-lambda" "match-lambda*" "match-let" "match-let*" "match-letrec" "match-define" "mixin" "module" "opt-lambda" "or" "override" "override*" "namespace-variable-bind/invoke-unit/sig" "parameterize" "private" "private*" "protect" "provide" "provide-signature-elements" "provide/contract" "public" "public*" "quote" "receive" "rename" "require" "require-for-syntax" "send" "send*" "set!" "set!-values" "signature->symbols" "super-instantiate" "syntax-case" "syntax-case*" "syntax-error" "syntax-rules" "unit/sig" "unless" "when" "with-handlers" "with-method" "with-syntax")))
 '(quack-pretty-lambda-p nil)
 '(quack-programs (quote ("petite" "bigloo" "csi" "gosh" "gsi" "guile" "kawa" "mit-scheme" "mred -z" "mzscheme" "mzscheme -M errortrace" "rs" "scheme" "scheme48" "scsh" "sisc" "stklos" "sxi")))
 '(quack-remap-find-file-bindings-p nil)
 '(quack-run-scheme-always-prompts-p nil)
 '(quack-switch-to-scheme-method (quote cmuscheme)))

(custom-set-faces
  ;; custom-set-faces was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 '(default ((t (:inherit nil :stipple nil :background "#233b5a" :foreground "#fff8dc" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 109 :width normal :foundry "unknown" :family "DejaVu Sans Mono"))))
 '(quack-pltish-comment-face ((((class color) (background dark)) (:slant italic))))
 '(quack-pltish-defn-face ((t (:foreground "purple1" :weight bold))))
 '(quack-pltish-keyword-face ((t (:foreground "cyan"))))
 '(quack-pltish-paren-face ((((class color) (background dark)) (:foreground "cyan3"))))
 '(quack-pltish-selfeval-face ((((class color) (background dark)) (:foreground "green"))))
 '(quack-threesemi-semi-face ((((class color) (background dark)) (:background "white" :foreground "white" :box nil))))
 '(quack-threesemi-text-face ((((class color) (background dark)) (:background "cyan4" :foreground "white" :box nil)))))
share|improve this question
add comment

2 Answers

I also work with a different font, the command in my .emacs is

(set-face-font 'default "-misc-fixed-medium-r-normal--20-*-*-*-c-100-iso8859-1")
share|improve this answer
add comment

Although this may not help you get your specific font to work I hope you will find it generally helpful.

I've got this in my .emacs (which I use across many systems) for portability. It searches for a given font from the list and applies any it finds to the default.

I apologise for the non-lisp style looping; it was a very long time ago.

(defun font-existsp (font)
  "Check that a font exists: http://www.emacswiki.org/emacs/SetFonts#toc8"
  (and (window-system)
       (fboundp 'x-list-fonts)
       (x-list-fonts font)))

;;**************************************************
;; font Searching
;;**************************************************
(setq kjfletch-font-list
      '(;; List of fonts to search for in order of priority.
        ;; Each has it's own line for easy transposing.
        "Consolas-10"
        "ProggyOpti-8"
        "ProggyOptiS-8"
        "ProggyClean-10"
        "Consolas-8"
        "DejaVu Sans Mono-8"
        ;; "Lucida Console-8"
        "Courier New-8"
        ))

(let* ((in-loop t)
       (font (car kjfletch-font-list))
       (rest (cdr kjfletch-font-list)))
  (while (and font in-loop)
    (when (font-existsp font)
      (set-face-attribute 'default nil :font font)
      (setq in-loop nil))
    (setq font (car rest)
          rest (cdr rest))))
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.