all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* set-face-attribute: apparent bug or doc error
@ 2020-08-26 12:34 ken
  2020-08-26 12:41 ` Eli Zaretskii
  2020-08-26 12:58 ` Tassilo Horn
  0 siblings, 2 replies; 4+ messages in thread
From: ken @ 2020-08-26 12:34 UTC (permalink / raw)
  To: help-gnu-emacs

Executing

(set-face-attribute 'default nil :family "alegreya" :foundry "misc"
:slant normal :weight "medium" :height 258 :width "normal")

yields error:

Debugger entered--Lisp error: (void-variable normal)
  (set-face-attribute 'default nil :family "alegreya" :foundry "misc"
:slant normal :weight "medium" :height 258 :width "normal")
....

The doc string, however, says:

‘:slant’

VALUE specifies the slant of the font to use.  It must be one of the
symbols ‘italic’, ‘oblique’, ‘normal’, ‘reverse-italic’, or
‘reverse-oblique’.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: set-face-attribute: apparent bug or doc error
  2020-08-26 12:34 set-face-attribute: apparent bug or doc error ken
@ 2020-08-26 12:41 ` Eli Zaretskii
  2020-08-26 12:58 ` Tassilo Horn
  1 sibling, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2020-08-26 12:41 UTC (permalink / raw)
  To: help-gnu-emacs

> From: ken <gebser@mousecar.com>
> Date: Wed, 26 Aug 2020 08:34:13 -0400
> 
> Executing
> 
> (set-face-attribute 'default nil :family "alegreya" :foundry "misc"
> :slant normal :weight "medium" :height 258 :width "normal")
> 
> yields error:
> 
> Debugger entered--Lisp error: (void-variable normal)
>   (set-face-attribute 'default nil :family "alegreya" :foundry "misc"
> :slant normal :weight "medium" :height 258 :width "normal")
> ....
> 
> The doc string, however, says:
> 
> ‘:slant’
> 
> VALUE specifies the slant of the font to use.  It must be one of the
> symbols ‘italic’, ‘oblique’, ‘normal’, ‘reverse-italic’, or
> ‘reverse-oblique’.

Try

    :slant 'normal

(with the apostrophe), since the doc strings says it wants a symbol.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: set-face-attribute: apparent bug or doc error
  2020-08-26 12:34 set-face-attribute: apparent bug or doc error ken
  2020-08-26 12:41 ` Eli Zaretskii
@ 2020-08-26 12:58 ` Tassilo Horn
  2020-08-26 19:19   ` ken
  1 sibling, 1 reply; 4+ messages in thread
From: Tassilo Horn @ 2020-08-26 12:58 UTC (permalink / raw)
  To: ken; +Cc: help-gnu-emacs

ken <gebser@mousecar.com> writes:

> (set-face-attribute 'default nil :family "alegreya" :foundry "misc"
> :slant normal :weight "medium" :height 258 :width "normal")
         ^^^^^^
> yields error:
>
> Debugger entered--Lisp error: (void-variable normal)
>   (set-face-attribute 'default nil :family "alegreya" :foundry "misc"
> :slant normal :weight "medium" :height 258 :width "normal")
> ....
>
> The doc string, however, says:
>
> ‘:slant’
>
> VALUE specifies the slant of the font to use.  It must be one of the
> symbols ‘italic’, ‘oblique’, ‘normal’, ‘reverse-italic’, or
> ‘reverse-oblique’.

Exactly, it must be a symbol, so use :slant 'normal.

Bye,
Tassilo



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: set-face-attribute: apparent bug or doc error
  2020-08-26 12:58 ` Tassilo Horn
@ 2020-08-26 19:19   ` ken
  0 siblings, 0 replies; 4+ messages in thread
From: ken @ 2020-08-26 19:19 UTC (permalink / raw)
  To: help-gnu-emacs

On 8/26/20 8:58 AM, Tassilo Horn wrote:
> ken <gebser@mousecar.com> writes:
>
>> (set-face-attribute 'default nil :family "alegreya" :foundry "misc"
>> :slant normal :weight "medium" :height 258 :width "normal")
>          ^^^^^^
>> yields error:
>>
>> Debugger entered--Lisp error: (void-variable normal)
>>   (set-face-attribute 'default nil :family "alegreya" :foundry "misc"
>> :slant normal :weight "medium" :height 258 :width "normal")
>> ....
>>
>> The doc string, however, says:
>>
>> ‘:slant’
>>
>> VALUE specifies the slant of the font to use.  It must be one of the
>> symbols ‘italic’, ‘oblique’, ‘normal’, ‘reverse-italic’, or
>> ‘reverse-oblique’.
> Exactly, it must be a symbol, so use :slant 'normal.
>
> Bye,
> Tassilo
Great!  That did it!!

I wish the doc string would be more explicit, like "since the VALUE is a
symbol, it must begin with an apostrophe", pretty much what you and Eli
said... and/or give some example usages.  That would be a big help to
elisp dummies like myself.

Also, I copy-and-pasted the whole of the variables and values from a
line put into my ~/.gnu-emacs-custom automatically when I used the emacs
menu (Options -> Set Default Font) to configure emacs with a larger
font.  When it worked there, it surprised me when it didn't work when I
put it into my ~/.emacs ... the line in ~/.gnu-emacs-custom looks like this:

'(default ((t (:family "alegreya" :foundry "misc" :slant normal :weight
normal :height 158 :width normal)))))

Thanks again, guys.  My whole .emacs seems to be working now.







^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-08-26 19:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-26 12:34 set-face-attribute: apparent bug or doc error ken
2020-08-26 12:41 ` Eli Zaretskii
2020-08-26 12:58 ` Tassilo Horn
2020-08-26 19:19   ` ken

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.