changeset 106102:0cdf7c60b414

* font-setting.el (font-use-system-font): Declare for byte-compiler. (font-setting-change-default-font): Fix typo in docstring.
author Juanma Barranquero <lekktu@gmail.com>
date Wed, 18 Nov 2009 11:26:47 +0000
parents 792912125cc4
children a3a5df7c686c
files lisp/ChangeLog lisp/font-setting.el
diffstat 2 files changed, 14 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Wed Nov 18 07:07:32 2009 +0000
+++ b/lisp/ChangeLog	Wed Nov 18 11:26:47 2009 +0000
@@ -1,3 +1,8 @@
+2009-11-18  Juanma Barranquero  <lekktu@gmail.com>
+
+	* font-setting.el (font-use-system-font): Declare for byte-compiler.
+	(font-setting-change-default-font): Fix typo in docstring.
+
 2009-11-18  Alan Mackenzie  <acm@muc.de>
 
 	* progmodes/cc-defs.el (c-version): Bump to 5.31.8.
--- a/lisp/font-setting.el	Wed Nov 18 07:07:32 2009 +0000
+++ b/lisp/font-setting.el	Wed Nov 18 11:26:47 2009 +0000
@@ -1,4 +1,4 @@
-;;; xsettings.el --- Support dynamic font changes
+;;; font-setting.el --- Support dynamic font changes
 
 ;; Copyright (C) 2009 Free Software Foundation, Inc.
 
@@ -33,14 +33,16 @@
 
 (declare-function font-get-system-font "xsettings.c" ())
 
+(defvar font-use-system-font)
+
 (defun font-setting-change-default-font (display-or-frame set-font)
   "Change font and/or font settings for frames on display DISPLAY-OR-FRAME.
 If DISPLAY-OR-FRAME is a frame, the display is the one for that frame.
 
-If set-font is non-nil, change the font for frames.  Otherwise re-apply the
+If SET-FONT is non-nil, change the font for frames.  Otherwise re-apply the
 current form for the frame (i.e. hinting or somesuch changed)."
 
-  (let ((new-font (and (fboundp 'font-get-system-font) 
+  (let ((new-font (and (fboundp 'font-get-system-font)
 		       (font-get-system-font))))
     (when new-font
       ;; Be careful here: when set-face-attribute is called for the
@@ -53,7 +55,7 @@
       ;; probably changed it.
       (dolist (f (frames-on-display-list display-or-frame))
 	(if (display-graphic-p f)
-	    (let* ((frame-font 
+	    (let* ((frame-font
 		    (or (font-get (face-attribute 'default :font f
 						  'default) :name)
 			(frame-parameter f 'font-parameter)))
@@ -65,12 +67,12 @@
 		  (progn
 		    (message "setting %s" font-to-set)
 		    (set-frame-parameter f 'font-parameter font-to-set)
-		    (set-face-attribute 'default f 
+		    (set-face-attribute 'default f
 					:width 'normal
 					:weight 'normal
 					:slant 'normal
 					:font font-to-set))))))
-    
+
       ;; Set for future frames.
       (set-face-attribute 'default t :font new-font)
       (let ((spec (list (list t (face-attr-construct 'default)))))
@@ -91,7 +93,7 @@
 					  (eq type 'font-name)))))
 
 (if (or (featurep 'system-font-setting) (featurep 'font-render-setting))
-  (define-key special-event-map [config-changed-event] 
+  (define-key special-event-map [config-changed-event]
     'font-setting-handle-config-changed-event))
 
 (provide 'font-setting)