mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-24 07:20:37 +00:00
Merge from origin/emacs-30
dbcd9d782c
Fix documentation and error message of adding local varia...94bf7ad797
Document the 'display-line-numbers-disable' propertyb1be0f2ba6
Document issues with 'use-package's ':custom' and byte co...775970a783
; * src/ftcrfont.c (ftcrhbfont_end_hb_font): Improve comm...9149aa89ee
Fix display of compositions when font style changes (Cair...3bf00777be
; * src/xdisp.c (face_before_or_after_it_pos): Fix thinko...
This commit is contained in:
commit
61c8cc740e
@ -1825,8 +1825,8 @@ overlay properties and text properties for a given character.
|
||||
of them:
|
||||
|
||||
@table @code
|
||||
@item priority
|
||||
@kindex priority @r{(overlay property)}
|
||||
@item priority
|
||||
This property's value determines the priority of the overlay. If you
|
||||
want to specify a priority value, use either @code{nil} (or zero), or
|
||||
a positive integer, or a cons of two values. Any other value triggers
|
||||
@ -1865,19 +1865,19 @@ Currently, all overlays take priority over text properties.
|
||||
If you need to put overlays in priority order, use the @var{sorted}
|
||||
argument of @code{overlays-at}. @xref{Finding Overlays}.
|
||||
|
||||
@item window
|
||||
@kindex window @r{(overlay property)}
|
||||
@item window
|
||||
If the @code{window} property is non-@code{nil}, then the overlay
|
||||
applies only on that window.
|
||||
|
||||
@item category
|
||||
@kindex category @r{(overlay property)}
|
||||
@item category
|
||||
If an overlay has a @code{category} property, we call it the
|
||||
@dfn{category} of the overlay. It should be a symbol. The properties
|
||||
of the symbol serve as defaults for the properties of the overlay.
|
||||
|
||||
@item face
|
||||
@kindex face @r{(overlay property)}
|
||||
@item face
|
||||
This property controls the appearance of the text (@pxref{Faces}).
|
||||
The value of the property can be the following:
|
||||
|
||||
@ -1905,37 +1905,37 @@ form is supported for backward compatibility only, and should be
|
||||
avoided.
|
||||
@end itemize
|
||||
|
||||
@item mouse-face
|
||||
@kindex mouse-face @r{(overlay property)}
|
||||
@item mouse-face
|
||||
This property is used instead of @code{face} when the mouse is within
|
||||
the range of the overlay. However, Emacs ignores all face attributes
|
||||
from this property that alter the text size (e.g., @code{:height},
|
||||
@code{:weight}, and @code{:slant}); those attributes are always the
|
||||
same as in the unhighlighted text.
|
||||
|
||||
@item display
|
||||
@kindex display @r{(overlay property)}
|
||||
@item display
|
||||
This property activates various features that change the
|
||||
way text is displayed. For example, it can make text appear taller
|
||||
or shorter, higher or lower, wider or narrower, or replaced with an image.
|
||||
@xref{Display Property}.
|
||||
|
||||
@item help-echo
|
||||
@kindex help-echo @r{(overlay property)}
|
||||
@item help-echo
|
||||
If an overlay has a @code{help-echo} property, then when you move the
|
||||
mouse onto the text in the overlay, Emacs displays a help string in
|
||||
the echo area, or as a tooltip. For details see @ref{Text help-echo}.
|
||||
|
||||
@item field
|
||||
@kindex field @r{(overlay property)}
|
||||
@item field
|
||||
@c Copied from Special Properties.
|
||||
Consecutive characters with the same @code{field} property constitute a
|
||||
@emph{field}. Some motion functions including @code{forward-word} and
|
||||
@code{beginning-of-line} stop moving at a field boundary.
|
||||
@xref{Fields}.
|
||||
|
||||
@item modification-hooks
|
||||
@kindex modification-hooks @r{(overlay property)}
|
||||
@item modification-hooks
|
||||
This property's value is a list of functions to be called if any
|
||||
character within the overlay is changed or if text is inserted strictly
|
||||
within the overlay.
|
||||
@ -1966,26 +1966,26 @@ prepare for that. @xref{Change Hooks}.
|
||||
Text properties also support the @code{modification-hooks} property,
|
||||
but the details are somewhat different (@pxref{Special Properties}).
|
||||
|
||||
@item insert-in-front-hooks
|
||||
@kindex insert-in-front-hooks @r{(overlay property)}
|
||||
@item insert-in-front-hooks
|
||||
This property's value is a list of functions to be called before and
|
||||
after inserting text right at the beginning of the overlay. The calling
|
||||
conventions are the same as for the @code{modification-hooks} functions.
|
||||
|
||||
@item insert-behind-hooks
|
||||
@kindex insert-behind-hooks @r{(overlay property)}
|
||||
@item insert-behind-hooks
|
||||
This property's value is a list of functions to be called before and
|
||||
after inserting text right at the end of the overlay. The calling
|
||||
conventions are the same as for the @code{modification-hooks} functions.
|
||||
|
||||
@item invisible
|
||||
@kindex invisible @r{(overlay property)}
|
||||
@item invisible
|
||||
The @code{invisible} property can make the text in the overlay
|
||||
invisible, which means that it does not appear on the screen.
|
||||
@xref{Invisible Text}, for details.
|
||||
|
||||
@item intangible
|
||||
@kindex intangible @r{(overlay property)}
|
||||
@item intangible
|
||||
The @code{intangible} property on an overlay works just like the
|
||||
@code{intangible} text property. It is obsolete. @xref{Special
|
||||
Properties}, for details.
|
||||
@ -2000,15 +2000,15 @@ Text}.
|
||||
This property tells incremental search how to make an invisible overlay
|
||||
visible, temporarily, during the search. @xref{Invisible Text}.
|
||||
|
||||
@item before-string
|
||||
@kindex before-string @r{(overlay property)}
|
||||
@item before-string
|
||||
This property's value is a string to add to the display at the beginning
|
||||
of the overlay. The string does not appear in the buffer in any
|
||||
sense---only on the screen. Note that if the text at the beginning of
|
||||
the overlay is made invisible, the string will not be displayed.
|
||||
|
||||
@item after-string
|
||||
@kindex after-string @r{(overlay property)}
|
||||
@item after-string
|
||||
This property's value is a string to add to the display at the end of
|
||||
the overlay. The string does not appear in the buffer in any
|
||||
sense---only on the screen. Note that if the text at the end of the
|
||||
@ -2022,8 +2022,8 @@ non-continuation line at display-time. @xref{Truncation}.
|
||||
This property specifies a display spec to prepend to each continuation
|
||||
line at display-time. @xref{Truncation}.
|
||||
|
||||
@item evaporate
|
||||
@kindex evaporate @r{(overlay property)}
|
||||
@item evaporate
|
||||
If this property is non-@code{nil}, the overlay is deleted automatically
|
||||
if it becomes empty (i.e., if its length becomes zero). If you give
|
||||
an empty overlay (@pxref{Managing Overlays, empty overlay}) a
|
||||
@ -2032,9 +2032,18 @@ Note that, unless an overlay has this property, it will not be deleted
|
||||
when the text between its starting and ending positions is deleted
|
||||
from the buffer.
|
||||
|
||||
@item keymap
|
||||
@kindex display-line-numbers-disable @r{(overlay property)}
|
||||
@item display-line-numbers-disable
|
||||
This property prevents display of line numbers (@pxref{Display Custom,
|
||||
display-line-numbers,, emacs, The GNU Emacs Manual}) for the text which
|
||||
is within an overlay having this property. One situation where using an
|
||||
overlay with this property is useful is an empty overlay at
|
||||
end-of-buffer, since otherwise there's no way of preventing the display
|
||||
of the line number there.
|
||||
|
||||
@cindex keymap of character (and overlays)
|
||||
@kindex keymap @r{(overlay property)}
|
||||
@item keymap
|
||||
If this property is non-@code{nil}, it specifies a keymap for a
|
||||
portion of the text. This keymap takes precedence over most other
|
||||
keymaps (@pxref{Active Keymaps}), and it is used when point is within
|
||||
@ -2042,8 +2051,8 @@ the overlay, where the front-
|
||||
and rear-advance properties define whether the boundaries are
|
||||
considered as being @emph{within} or not.
|
||||
|
||||
@item local-map
|
||||
@kindex local-map @r{(overlay property)}
|
||||
@item local-map
|
||||
The @code{local-map} property is similar to @code{keymap} but replaces the
|
||||
buffer's local map rather than augmenting existing keymaps. This also means it
|
||||
has lower precedence than minor mode keymaps.
|
||||
|
@ -3569,8 +3569,8 @@ the context.
|
||||
The @code{add-face-text-property} function provides a convenient way
|
||||
to set this text property. @xref{Changing Properties}.
|
||||
|
||||
@item font-lock-face
|
||||
@kindex font-lock-face @r{(text property)}
|
||||
@item font-lock-face
|
||||
This property specifies a value for the @code{face} property that Font
|
||||
Lock mode should apply to the underlying text. It is one of the
|
||||
fontification methods used by Font Lock mode, and is useful for
|
||||
@ -3578,8 +3578,8 @@ special modes that implement their own highlighting.
|
||||
@xref{Precalculated Fontification}. When Font Lock mode is disabled,
|
||||
@code{font-lock-face} has no effect.
|
||||
|
||||
@item mouse-face
|
||||
@kindex mouse-face @r{(text property)}
|
||||
@item mouse-face
|
||||
This property is used instead of @code{face} when the mouse pointer
|
||||
hovers over the text which has this property. When this happens, the
|
||||
entire stretch of text that has the same @code{mouse-face} property
|
||||
@ -3590,10 +3590,10 @@ that alter the text size (e.g., @code{:height}, @code{:weight}, and
|
||||
@code{:slant}). Those attributes are always the same as for the
|
||||
unhighlighted text.
|
||||
|
||||
@item cursor-face
|
||||
@kindex cursor-face @r{(text property)}
|
||||
@findex cursor-face-highlight-mode
|
||||
@vindex cursor-face-highlight-nonselected-window
|
||||
@item cursor-face
|
||||
This property is similar to @code{mouse-face}, but it is used when
|
||||
point (not the mouse) is inside text that has this property. The
|
||||
highlighting happens only if the mode
|
||||
@ -3604,8 +3604,8 @@ similarly to what @code{highlight-nonselected-windows} does for the
|
||||
region (@pxref{Mark,, The Mark and the Region, emacs, The GNU Emacs
|
||||
Manual}).
|
||||
|
||||
@item fontified
|
||||
@kindex fontified @r{(text property)}
|
||||
@item fontified
|
||||
This property says whether the text is ready for display. If
|
||||
@code{nil}, Emacs's redisplay routine calls the functions in
|
||||
@code{fontification-functions} (@pxref{Auto Faces}) to prepare this
|
||||
@ -3618,9 +3618,9 @@ way text is displayed. For example, it can make text appear taller
|
||||
or shorter, higher or lower, wider or narrow, or replaced with an image.
|
||||
@xref{Display Property}.
|
||||
|
||||
@item help-echo
|
||||
@kindex help-echo @r{(text property)}
|
||||
@cindex tooltip for help strings
|
||||
@item help-echo
|
||||
@anchor{Text help-echo}
|
||||
If text has a string as its @code{help-echo} property, then when you
|
||||
move the mouse onto that text, Emacs displays that string in the echo
|
||||
@ -3655,17 +3655,17 @@ You can alter the way help text is displayed by setting the variable
|
||||
|
||||
This feature is used in the mode line and for other active text.
|
||||
|
||||
@item help-echo-inhibit-substitution
|
||||
@cindex help-echo text, avoid command-key substitution
|
||||
@kindex help-echo-inhibit-substitution @r{(text property)}
|
||||
@item help-echo-inhibit-substitution
|
||||
If the first character of a @code{help-echo} string has a
|
||||
non-@code{nil} @code{help-echo-inhibit-substitution} property, then it
|
||||
is displayed as-is by @code{show-help-function}, without being passed
|
||||
through @code{substitute-command-keys}.
|
||||
|
||||
@cindex help-echo text on fringes
|
||||
@item left-fringe-help
|
||||
@itemx right-fringe-help
|
||||
@cindex help-echo text on fringes
|
||||
If any visible text of a screen line has the @code{left-fringe-help} or
|
||||
@code{right-fringe-help} text property whose value is a string, then
|
||||
that string will be displayed when the mouse pointer hovers over the
|
||||
@ -3673,9 +3673,9 @@ corresponding line's fringe through @code{show-help-function}
|
||||
(@pxref{Help display}). This is useful when used together with fringe
|
||||
cursors and bitmaps (@pxref{Fringes}).
|
||||
|
||||
@item keymap
|
||||
@cindex keymap of character
|
||||
@kindex keymap @r{(text property)}
|
||||
@item keymap
|
||||
The @code{keymap} property specifies an additional keymap for
|
||||
commands. When this keymap applies, it is used for key lookup before
|
||||
the minor mode keymaps and before the buffer's local map.
|
||||
@ -3688,8 +3688,8 @@ character after point applies if it is non-@code{nil} and
|
||||
front-sticky. (For mouse clicks, the position of the click is used
|
||||
instead of the position of point.)
|
||||
|
||||
@item local-map
|
||||
@kindex local-map @r{(text property)}
|
||||
@item local-map
|
||||
This property works like @code{keymap} except that it specifies a
|
||||
keymap to use @emph{instead of} the buffer's local map. For most
|
||||
purposes (perhaps all purposes), it is better to use the @code{keymap}
|
||||
@ -3699,9 +3699,9 @@ property.
|
||||
The @code{syntax-table} property overrides what the syntax table says
|
||||
about this particular character. @xref{Syntax Properties}.
|
||||
|
||||
@item read-only
|
||||
@cindex read-only character
|
||||
@kindex read-only @r{(text property)}
|
||||
@item read-only
|
||||
If a character has the property @code{read-only}, then modifying that
|
||||
character is not allowed. Any command that would do so gets an error,
|
||||
@code{text-read-only}. If the property value is a string, that string
|
||||
@ -3717,23 +3717,23 @@ possible to remove a @code{read-only} property unless you know the
|
||||
special trick: bind @code{inhibit-read-only} to a non-@code{nil} value
|
||||
and then remove the property. @xref{Read Only Buffers}.
|
||||
|
||||
@item inhibit-read-only
|
||||
@kindex inhibit-read-only @r{(text property)}
|
||||
@item inhibit-read-only
|
||||
Characters that have the property @code{inhibit-read-only} can be
|
||||
edited even in read-only buffers. @xref{Read Only Buffers}.
|
||||
|
||||
@item invisible
|
||||
@kindex invisible @r{(text property)}
|
||||
@item invisible
|
||||
A non-@code{nil} @code{invisible} property can make a character invisible
|
||||
on the screen. @xref{Invisible Text}, for details.
|
||||
|
||||
@kindex inhibit-isearch @r{(text property)}
|
||||
@item inhibit-isearch
|
||||
@kindex inhibit-isearch @r{(text property)}
|
||||
A non-@code{nil} @code{inhibit-isearch} property will make isearch
|
||||
skip the text.
|
||||
|
||||
@item intangible
|
||||
@kindex intangible @r{(text property)}
|
||||
@item intangible
|
||||
If a group of consecutive characters have equal and non-@code{nil}
|
||||
@code{intangible} properties, then you cannot place point between them.
|
||||
If you try to move point forward into the group, point actually moves to
|
||||
@ -3754,10 +3754,10 @@ the command loop will move point outside of the invisible text at the end of
|
||||
each command anyway. @xref{Adjusting Point}. For these reasons, this
|
||||
property is obsolete; use the @code{cursor-intangible} property instead.
|
||||
|
||||
@item cursor-intangible
|
||||
@kindex cursor-intangible @r{(text property)}
|
||||
@findex cursor-intangible-mode
|
||||
@cindex rear-nonsticky, and cursor-intangible property
|
||||
@item cursor-intangible
|
||||
When the minor mode @code{cursor-intangible-mode} is turned on, point
|
||||
is moved away from any position that has a non-@code{nil}
|
||||
@code{cursor-intangible} property, just before redisplay happens.
|
||||
@ -3777,15 +3777,15 @@ When the variable @code{cursor-sensor-inhibit} is non-@code{nil}, the
|
||||
@code{cursor-intangible} property and the
|
||||
@code{cursor-sensor-functions} property (described below) are ignored.
|
||||
|
||||
@item field
|
||||
@kindex field @r{(text property)}
|
||||
@item field
|
||||
Consecutive characters with the same @code{field} property constitute a
|
||||
@dfn{field}. Some motion functions including @code{forward-word} and
|
||||
@code{beginning-of-line} stop moving at a field boundary.
|
||||
@xref{Fields}.
|
||||
|
||||
@item cursor
|
||||
@kindex cursor @r{(text property)}
|
||||
@item cursor
|
||||
Normally, the cursor is displayed at the beginning or the end of any
|
||||
overlay and text property strings that ``hide'' (i.e., are displayed
|
||||
instead of) the current buffer position. You can instead tell Emacs
|
||||
@ -3834,21 +3834,21 @@ Lisp program wants to put the cursor, or where the user would expect
|
||||
the cursor, when point is located on some buffer position that is
|
||||
``covered'' by the display or overlay string.
|
||||
|
||||
@item pointer
|
||||
@kindex pointer @r{(text property)}
|
||||
@item pointer
|
||||
This specifies a specific pointer shape when the mouse pointer is over
|
||||
this text or image. @xref{Pointer Shape}, for possible pointer
|
||||
shapes.
|
||||
|
||||
@item line-spacing
|
||||
@kindex line-spacing @r{(text property)}
|
||||
@item line-spacing
|
||||
A newline can have a @code{line-spacing} text or overlay property that
|
||||
controls the height of the display line ending with that newline. The
|
||||
property value overrides the default frame line spacing and the buffer
|
||||
local @code{line-spacing} variable. @xref{Line Height}.
|
||||
|
||||
@item line-height
|
||||
@kindex line-height @r{(text property)}
|
||||
@item line-height
|
||||
A newline can have a @code{line-height} text or overlay property that
|
||||
controls the total height of the display line ending in that newline.
|
||||
@xref{Line Height}.
|
||||
@ -3892,10 +3892,10 @@ A line-prefix may also be specified for an entire buffer using the
|
||||
@code{line-prefix} text-property takes precedence over the value of
|
||||
the @code{line-prefix} variable). @xref{Truncation}.
|
||||
|
||||
@item modification-hooks
|
||||
@cindex change hooks for a character
|
||||
@cindex hooks for changing a character
|
||||
@kindex modification-hooks @r{(text property)}
|
||||
@item modification-hooks
|
||||
If a character has the property @code{modification-hooks}, then its
|
||||
value should be a list of functions; modifying that character calls
|
||||
all of those functions before the actual modification. Each function
|
||||
@ -3918,10 +3918,10 @@ recursive calls. @xref{Change Hooks}.
|
||||
Overlays also support the @code{modification-hooks} property, but the
|
||||
details are somewhat different (@pxref{Overlay Properties}).
|
||||
|
||||
@item insert-in-front-hooks
|
||||
@itemx insert-behind-hooks
|
||||
@kindex insert-in-front-hooks @r{(text property)}
|
||||
@kindex insert-behind-hooks @r{(text property)}
|
||||
@item insert-in-front-hooks
|
||||
@itemx insert-behind-hooks
|
||||
The operation of inserting text in a buffer also calls the functions
|
||||
listed in the @code{insert-in-front-hooks} property of the following
|
||||
character and in the @code{insert-behind-hooks} property of the
|
||||
@ -3939,11 +3939,11 @@ prepare for that.
|
||||
See also @ref{Change Hooks}, for other hooks that are called
|
||||
when you change text in a buffer.
|
||||
|
||||
@item point-entered
|
||||
@itemx point-left
|
||||
@cindex hooks for motion of point
|
||||
@kindex point-entered @r{(text property)}
|
||||
@kindex point-left @r{(text property)}
|
||||
@item point-entered
|
||||
@itemx point-left
|
||||
The special properties @code{point-entered} and @code{point-left}
|
||||
record hook functions that report motion of point. Each time point
|
||||
moves, Emacs compares these two property values:
|
||||
@ -3979,9 +3979,9 @@ running the @code{point-left} and @code{point-entered} hooks, see
|
||||
These properties are obsolete; please use
|
||||
@code{cursor-sensor-functions} instead.
|
||||
|
||||
@item cursor-sensor-functions
|
||||
@kindex cursor-sensor-functions @r{(text property)}
|
||||
@findex cursor-sensor-mode
|
||||
@item cursor-sensor-functions
|
||||
This special property records a list of functions that react to cursor
|
||||
motion. Each function in the list is called, just before redisplay,
|
||||
with 3 arguments: the affected window, the previous known position of
|
||||
@ -3993,15 +3993,15 @@ mode @code{cursor-sensor-mode} is turned on.
|
||||
When the variable @code{cursor-sensor-inhibit} is non-@code{nil}, the
|
||||
@code{cursor-sensor-functions} property is ignored.
|
||||
|
||||
@item composition
|
||||
@kindex composition @r{(text property)}
|
||||
@item composition
|
||||
This text property is used to display a sequence of characters as a
|
||||
single glyph composed from components. But the value of the property
|
||||
itself is completely internal to Emacs and should not be manipulated
|
||||
directly by, for instance, @code{put-text-property}.
|
||||
|
||||
@item minibuffer-message
|
||||
@kindex minibuffer-message @r{(text property)}
|
||||
@item minibuffer-message
|
||||
This text property tells where to display temporary messages in an
|
||||
active minibuffer. Specifically, the first character of the
|
||||
minibuffer text which has this property will have the temporary
|
||||
@ -4010,6 +4010,12 @@ messages at the end of the minibuffer text. This text property is
|
||||
used by the function that is the default value of
|
||||
@code{set-message-function} (@pxref{Displaying Messages}).
|
||||
|
||||
@kindex display-line-numbers-disable @r{(text property)}
|
||||
@item display-line-numbers-disable
|
||||
This text property prevents display of line numbers (@pxref{Display
|
||||
Custom, display-line-numbers,, emacs, The GNU Emacs Manual}) for the
|
||||
text which has this property.
|
||||
|
||||
@end table
|
||||
|
||||
@defvar inhibit-point-motion-hooks
|
||||
|
@ -1416,6 +1416,13 @@ for the same variable, as this risks having conflicting values in your
|
||||
use-package declaration and your @code{custom-file}, which can lead to
|
||||
problems that are both tricky and tedious to debug.
|
||||
|
||||
Also note that if you use @code{:custom} in a file that you
|
||||
byte-compile, you could have some unexpected results if you later load
|
||||
or @code{require} @file{use-package} (e.g., due to lazy loading): the
|
||||
value of the corresponding user options could be reset back to their
|
||||
initial values. We therefore recommend against byte-compiling files
|
||||
that use @file{use-package} with @code{:custom} settings.
|
||||
|
||||
@node Faces
|
||||
@section Faces
|
||||
@cindex faces, setting
|
||||
|
@ -239,18 +239,23 @@ This command deletes all existing settings of VARIABLE (except `mode'
|
||||
and `eval') and adds a new file-local VARIABLE with VALUE to the
|
||||
Local Variables list.
|
||||
|
||||
If there is no Local Variables list in the current file buffer
|
||||
then this function adds the first line containing the string
|
||||
`Local Variables:' and the last line containing the string `End:'."
|
||||
If there is no Local Variables list in the current file buffer,
|
||||
then this function adds it at the end of the file, with the first
|
||||
line containing the string `Local Variables:' and the last line
|
||||
containing the string `End:'.
|
||||
|
||||
For adding local variables on the first line of a file, for example
|
||||
for settings like `lexical-binding, which must be specified there,
|
||||
use the `add-file-local-variable-prop-line' command instead."
|
||||
(interactive
|
||||
(let ((variable (read-file-local-variable "Add file-local variable")))
|
||||
;; Error before reading value.
|
||||
(if (equal variable 'lexical-binding)
|
||||
(user-error "The `%s' variable must be set at the start of the file"
|
||||
(user-error "Use `add-file-local-variable-prop-line' to add the `%s' variable"
|
||||
variable))
|
||||
(list variable (read-file-local-variable-value variable) t)))
|
||||
(if (equal variable 'lexical-binding)
|
||||
(user-error "The `%s' variable must be set at the start of the file"
|
||||
(user-error "Use `add-file-local-variable-prop-line' to add the `%s' variable"
|
||||
variable))
|
||||
(modify-file-local-variable variable value 'add-or-replace interactive))
|
||||
|
||||
@ -394,10 +399,13 @@ from the -*- line ignoring the input argument VALUE."
|
||||
|
||||
This command deletes all existing settings of VARIABLE (except `mode'
|
||||
and `eval') and adds a new file-local VARIABLE with VALUE to
|
||||
the -*- line.
|
||||
the -*- line at the beginning of the file.
|
||||
|
||||
If there is no -*- line at the beginning of the current file buffer
|
||||
then this function adds it."
|
||||
then this function adds it.
|
||||
|
||||
To add variables to the Local Variables list at the end of the file,
|
||||
use the `add-file-local-variable' command instead."
|
||||
(interactive
|
||||
(let ((variable (read-file-local-variable "Add -*- file-local variable")))
|
||||
(list variable (read-file-local-variable-value variable) t)))
|
||||
|
@ -708,6 +708,17 @@ ftcrhbfont_end_hb_font (struct font *font, hb_font_t *hb_font)
|
||||
struct font_info *ftcrfont_info = (struct font_info *) font;
|
||||
cairo_scaled_font_t *scaled_font = ftcrfont_info->cr_scaled_font;
|
||||
|
||||
eassert (hb_font == ftcrfont_info->hb_font);
|
||||
/* ftcrfont_info->hb_font holds a reference to the FT_Face returned by
|
||||
cairo_ft_scaled_font_lock_face. Keeping it around after the matching
|
||||
unlock call would violate the API contract, and cause corrupted
|
||||
display of composed characters (Bug#73752). We destroy and NULLify
|
||||
hb_font here, which will then cause fthbfont_begin_hb_font, called by
|
||||
ftcrhbfont_begin_hb_font, to recreate hb_font anew, taking into
|
||||
consideration any scale changes in FT_Face. */
|
||||
hb_font_destroy (ftcrfont_info->hb_font);
|
||||
ftcrfont_info->hb_font = NULL;
|
||||
|
||||
cairo_ft_scaled_font_unlock_face (scaled_font);
|
||||
ftcrfont_info->ft_size = NULL;
|
||||
}
|
||||
|
@ -4996,7 +4996,7 @@ face_before_or_after_it_pos (struct it *it, bool before_p)
|
||||
/* For composition, we must check the position after
|
||||
the composition. */
|
||||
pos.charpos += it->cmp_it.nchars;
|
||||
pos.bytepos += it->len;
|
||||
pos.bytepos += it->cmp_it.nbytes;
|
||||
}
|
||||
else
|
||||
INC_TEXT_POS (pos, it->multibyte_p);
|
||||
|
Loading…
Reference in New Issue
Block a user