From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Giorgos Keramidas Newsgroups: gmane.emacs.devel Subject: set-face-attribute and floating point :height values Date: Mon, 31 Jan 2011 12:33:49 -0800 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1296506068 21157 80.91.229.12 (31 Jan 2011 20:34:28 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 31 Jan 2011 20:34:28 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 31 21:34:24 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Pk0S7-0006n9-Bk for ged-emacs-devel@m.gmane.org; Mon, 31 Jan 2011 21:34:23 +0100 Original-Received: from localhost ([127.0.0.1]:33686 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pk0S3-0000v3-U8 for ged-emacs-devel@m.gmane.org; Mon, 31 Jan 2011 15:34:19 -0500 Original-Received: from [140.186.70.92] (port=46731 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pk0Ry-0000uk-Ch for emacs-devel@gnu.org; Mon, 31 Jan 2011 15:34:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pk0Rw-0004uw-Qg for emacs-devel@gnu.org; Mon, 31 Jan 2011 15:34:14 -0500 Original-Received: from igloo.linux.gr ([62.1.205.36]:57138) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pk0Rw-0004uS-9e for emacs-devel@gnu.org; Mon, 31 Jan 2011 15:34:12 -0500 X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-2.9, required 5, autolearn=not spam, ALL_TRUSTED -1.00, BAYES_00 -1.90) X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-ID: p0VKXo49026974 Original-Received: from gkeramidas-glaptop.linux.gr (216-239-45-4.google.com [216.239.45.4]) (authenticated bits=0) by igloo.linux.gr (8.14.3/8.14.3/Debian-9.4) with ESMTP id p0VKXo49026974 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Mon, 31 Jan 2011 22:34:00 +0200 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 62.1.205.36 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:135351 Archived-At: My ~/.emacs file now includes the following to fine-tune the default face for X11 frames: (when (display-graphic-p) (set-face-attribute 'default nil :family "DejaVu Sans Mono" :width 'ultra-condensed :height 102) (require 'color-theme)) The documentation of `set-face-attribute' mentions that :height is supposed to accept floating point values too: ,----[ C-h f set-face-attribute ]--------------------------------------- | set-face-attribute is a compiled Lisp function in `faces.el'. | | (set-face-attribute FACE FRAME &rest ARGS) | | Set attributes of FACE on FRAME from ARGS. | [...] | | `:height' | | VALUE must be either an integer specifying the height of the font to use | in 1/10 pt, a floating point number specifying the amount by which to | scale any underlying face, or a function, which is called with the old | height (from the underlying face), and should return the new height. | [...] `----------------------------------------------------------------------- But trying to use a floating-point number in my ~/.emacs file throws up an error, e.g. when I evaluate in my *scratch* buffer the expression: (set-face-attribute 'default nil :family "DejaVu Sans Mono" :height 1.4) a debugger pops up with the following backtrace: Debugger entered--Lisp error: (error "Invalid default face height" 1.4) internal-set-lisp-face-attribute(default :height 1.4 0) set-face-attribute(default nil :family "DejaVu Sans Mono" :width ultra-condensed :height 1.4) eval((set-face-attribute (quote default) nil :family "DejaVu Sans Mono" :width (quote ultra-condensed) :height 1.4)) eval-last-sexp-1(nil) eval-last-sexp(nil) call-interactively(eval-last-sexp nil nil) Is the documentation of `set-face-attribute' out of date, or am I using it incorrectly?