diff options
| author | Stefan Kangas | 2022-02-01 06:57:16 +0100 |
|---|---|---|
| committer | Stefan Kangas | 2022-02-01 06:57:16 +0100 |
| commit | 30ebb54410d18a4f782fe39d21c1941f9852ec8f (patch) | |
| tree | fbcde4e1808baf184e235344830ef7e8688afb66 | |
| parent | 558c4dafa309445cd8ffc568303e2189f4effc03 (diff) | |
| parent | 31ef751f94fd028d6f1c6bcdf379a8b99769a894 (diff) | |
| download | emacs-30ebb54410d18a4f782fe39d21c1941f9852ec8f.tar.gz emacs-30ebb54410d18a4f782fe39d21c1941f9852ec8f.zip | |
Merge from origin/emacs-28
31ef751f94 Clarify documentation of a "face's font"
29bdedf12f Bind Qdebugger to Qdebug in signal_or_quit.
| -rw-r--r-- | doc/lispref/display.texi | 23 | ||||
| -rw-r--r-- | src/eval.c | 3 | ||||
| -rw-r--r-- | src/xfaces.c | 6 |
3 files changed, 20 insertions, 12 deletions
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index ee86df446a6..5d75e58108c 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi | |||
| @@ -2654,9 +2654,10 @@ used automatically to handle certain shades of gray. | |||
| 2654 | 2654 | ||
| 2655 | @item :font | 2655 | @item :font |
| 2656 | The font used to display the face. Its value should be a font object | 2656 | The font used to display the face. Its value should be a font object |
| 2657 | or a fontset. @xref{Low-Level Font}, for information about font | 2657 | or a fontset. If it is a font object, it specifies the font to be |
| 2658 | objects, font specs, and font entities. @xref{Fontsets}, for | 2658 | used by the face for displaying ASCII characters. @xref{Low-Level |
| 2659 | information about fontsets. | 2659 | Font}, for information about font objects, font specs, and font |
| 2660 | entities. @xref{Fontsets}, for information about fontsets. | ||
| 2660 | 2661 | ||
| 2661 | @anchor{face-font-attribute} | 2662 | @anchor{face-font-attribute} |
| 2662 | When specifying this attribute using @code{set-face-attribute} or | 2663 | When specifying this attribute using @code{set-face-attribute} or |
| @@ -3100,13 +3101,19 @@ return value is always specified, use a value of @code{default} for | |||
| 3100 | @var{inherit}. | 3101 | @var{inherit}. |
| 3101 | 3102 | ||
| 3102 | @defun face-font face &optional frame character | 3103 | @defun face-font face &optional frame character |
| 3103 | This function returns the name of the font of face @var{face}. | 3104 | This function returns the name of the font used by the specified |
| 3105 | @var{face}. | ||
| 3104 | 3106 | ||
| 3105 | If the optional argument @var{frame} is specified, it returns the name | 3107 | If the optional argument @var{frame} is specified, it returns the name |
| 3106 | of the font of @var{face} for that frame. If @var{frame} is omitted or | 3108 | of the font of @var{face} for that frame; @var{frame} defaults to the |
| 3107 | @code{nil}, the selected frame is used. In the latter case, if the | 3109 | selected frame if it is @code{nil} or omitted. If @var{frame} is |
| 3108 | optional third argument @var{character} is supplied, it returns the font | 3110 | @code{t}, the function reports on the font defaults for @var{face} to |
| 3109 | name used for @var{character}. | 3111 | be used for new frames. |
| 3112 | |||
| 3113 | By default, the returned font is for displaying ASCII characters, but | ||
| 3114 | if @var{frame} is anything but @code{t}, and the optional third | ||
| 3115 | argument @var{character} is supplied, the function returns the font | ||
| 3116 | name used by @var{face} for that character. | ||
| 3110 | @end defun | 3117 | @end defun |
| 3111 | 3118 | ||
| 3112 | @defun face-foreground face &optional frame inherit | 3119 | @defun face-foreground face &optional frame inherit |
diff --git a/src/eval.c b/src/eval.c index 1076985d097..4e8a4e9d9da 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -1884,7 +1884,7 @@ signal_or_quit (Lisp_Object error_symbol, Lisp_Object data, bool keyboard_quit) | |||
| 1884 | && NILP (Vinhibit_debugger)) | 1884 | && NILP (Vinhibit_debugger)) |
| 1885 | { | 1885 | { |
| 1886 | ptrdiff_t count = SPECPDL_INDEX (); | 1886 | ptrdiff_t count = SPECPDL_INDEX (); |
| 1887 | specbind (Vdebugger, Qdebug); | 1887 | specbind (Qdebugger, Qdebug); |
| 1888 | call_debugger (list2 (Qerror, Fcons (error_symbol, data))); | 1888 | call_debugger (list2 (Qerror, Fcons (error_symbol, data))); |
| 1889 | unbind_to (count, Qnil); | 1889 | unbind_to (count, Qnil); |
| 1890 | } | 1890 | } |
| @@ -4460,6 +4460,7 @@ might not be safe to continue. */); | |||
| 4460 | doc: /* Non-nil means display call stack frames as lists. */); | 4460 | doc: /* Non-nil means display call stack frames as lists. */); |
| 4461 | debugger_stack_frame_as_list = 0; | 4461 | debugger_stack_frame_as_list = 0; |
| 4462 | 4462 | ||
| 4463 | DEFSYM (Qdebugger, "debugger"); | ||
| 4463 | DEFVAR_LISP ("debugger", Vdebugger, | 4464 | DEFVAR_LISP ("debugger", Vdebugger, |
| 4464 | doc: /* Function to call to invoke debugger. | 4465 | doc: /* Function to call to invoke debugger. |
| 4465 | If due to frame exit, args are `exit' and the value being returned; | 4466 | If due to frame exit, args are `exit' and the value being returned; |
diff --git a/src/xfaces.c b/src/xfaces.c index 6a279f87192..76ce6932023 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -4151,9 +4151,9 @@ If the optional argument FRAME is given, report on face FACE in that frame. | |||
| 4151 | If FRAME is t, report on the defaults for face FACE (for new frames). | 4151 | If FRAME is t, report on the defaults for face FACE (for new frames). |
| 4152 | The font default for a face is either nil, or a list | 4152 | The font default for a face is either nil, or a list |
| 4153 | of the form (bold), (italic) or (bold italic). | 4153 | of the form (bold), (italic) or (bold italic). |
| 4154 | If FRAME is omitted or nil, use the selected frame. And, in this case, | 4154 | If FRAME is omitted or nil, use the selected frame. |
| 4155 | if the optional third argument CHARACTER is given, | 4155 | If FRAME is anything but t, and the optional third argument CHARACTER |
| 4156 | return the font name used for CHARACTER. */) | 4156 | is given, return the font name used by FACE for CHARACTER on FRAME. */) |
| 4157 | (Lisp_Object face, Lisp_Object frame, Lisp_Object character) | 4157 | (Lisp_Object face, Lisp_Object frame, Lisp_Object character) |
| 4158 | { | 4158 | { |
| 4159 | if (EQ (frame, Qt)) | 4159 | if (EQ (frame, Qt)) |