]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/textmodes/artist.el (artist-mode): Ensure we have a font
authorTino Calancha <tino.calancha@gmail.com>
Tue, 17 Apr 2018 13:20:28 +0000 (22:20 +0900)
committerTino Calancha <tino.calancha@gmail.com>
Tue, 17 Apr 2018 13:20:28 +0000 (22:20 +0900)
lisp/textmodes/artist.el

index 7c261f8d2d16d40a59c1667a4765f8dfedb5e8d5..e9ae6a4ce977b841b21011ff149e93e520406b08 100644 (file)
@@ -1402,8 +1402,9 @@ Keymap summary
        (t
         ;; Turn mode on
         (artist-mode-init)
-         (unless (font-get (face-attribute 'default :font) :spacing)
-           (message "The default font isn't monospaced, so the drawings in this buffer may look odd")))))
+         (let ((font (face-attribute 'default :font)))
+           (when (and (fontp font) (not (font-get font :spacing)))
+             (message "The default font isn't monospaced, so the drawings in this buffer may look odd"))))))
 
 ;; Init and exit
 (defun artist-mode-init ()