Commit 62d7ddb5 authored by Stefan Kangas's avatar Stefan Kangas
Browse files

Merge from origin/emacs-28

cfaf681d ; * src/emacs.c (main): Add commentary about command-line ...
4d16a2f7 Fix pdf generation with Texinfo 6.7
a22c9a34 Fix 'posn-at-point' near some overlays
d1aa552d ; * CONTRIBUTE: No cleanups on release branches, even in d...
588caf0b * lisp/repeat.el (repeat-post-hook): Add check symbolp rep...
parents 09c28ca0 cfaf681d
Pipeline #14227 failed with stages
in 499 minutes and 29 seconds
......@@ -342,7 +342,9 @@ Documentation fixes (in doc strings, in manuals, in NEWS, and in
comments) should always go to the release branch, if the documentation
to be fixed exists and is relevant to the release-branch codebase.
Doc fixes are always considered "safe" -- even when a release branch
is in feature freeze, it can still receive doc fixes.
is in feature freeze, it can still receive doc fixes. However, this
rule is limited to fixing real problems in the documentation; cleanups
and stylistic changes are excluded.
When you know that the change will be difficult to merge to the
master (e.g., because the code on master has changed a lot), you can
......
......@@ -2052,14 +2052,14 @@ means hide the excess parts of @var{string} with a @code{display} text
property (@pxref{Display Property}) showing the ellipsis, instead of
actually truncating the string.
@group
@example
@group
(truncate-string-to-width "\tab\t" 12 4)
@result{} "ab"
(truncate-string-to-width "\tab\t" 12 4 ?\s)
@result{} " ab "
@end example
@end group
@end example
This function uses @code{string-width} and @code{char-width} to find
the suitable truncation point when @var{string} is too wide, so it
......
......@@ -416,7 +416,7 @@ See `describe-repeat-maps' for a list of all repeatable commands."
(and (symbolp real-this-command)
(get real-this-command 'repeat-map)))))
(when rep-map
(when (boundp rep-map)
(when (and (symbolp rep-map) (boundp rep-map))
(setq rep-map (symbol-value rep-map)))
(let ((map (copy-keymap rep-map)))
......
......@@ -1356,6 +1356,39 @@ main (int argc, char **argv)
init_standard_fds ();
atexit (close_output_streams);
/* Command-line argument processing.
The arguments in the argv[] array are sorted in the descending
order of their priority as defined in the standard_args[] array
below. Then the sorted arguments are processed from the highest
to the lowest priority. Each command-line argument that is
recognized by 'main', if found in argv[], causes skip_args to be
incremented, effectively removing the processed argument from the
command line.
Then init_cmdargs is called, and conses a list of the unprocessed
command-line arguments, as strings, in 'command-line-args'. It
ignores all the arguments up to the one indexed by skip_args, as
those were already processed.
The arguments in 'command-line-args' are further processed by
startup.el, functions 'command-line' and 'command-line-1'. The
first of them handles the arguments which need to be processed
before loading the user init file and initializing the
window-system. The second one processes the arguments that are
related to the GUI system, like -font, -geometry, and -title, and
then processes the rest of arguments whose priority is below
those that are related to the GUI system. The arguments
porcessed by 'command-line' are removed from 'command-line-args';
the arguments processed by 'command-line-1' aren't, they are only
removed from 'command-line-args-left'.
'command-line-1' emits an error message for any argument it
doesn't recognize, so any command-line arguments processed in C
below whose priority is below the GUI system related switches
should be explicitly recognized, ignored, and removed from
'command-line-args-left' in 'command-line-1'. */
sort_args (argc, argv);
argc = 0;
while (argv[argc]) argc++;
......
......@@ -2001,7 +2001,17 @@ pos_visible_p (struct window *w, ptrdiff_t charpos, int *x, int *y,
}
 
*x = top_x;
*y = max (top_y + max (0, it.max_ascent - it.ascent), window_top_y);
/* The condition below is a heuristic fix for the situation
where move_it_to stops just after finishing the display
of a fringe bitmap, which resets it.ascent to zero, and
thus causes Y to be offset by it.max_ascent. */
if (it.ascent == 0 && it.what == IT_IMAGE
&& it.method != GET_FROM_IMAGE
&& it.image_id < 0
&& it.max_ascent > 0)
*y = max (top_y, window_top_y);
else
*y = max (top_y + max (0, it.max_ascent - it.ascent), window_top_y);
*rtop = max (0, window_top_y - top_y);
*rbot = max (0, bottom_y - it.last_visible_y);
*rowh = max (0, (min (bottom_y, it.last_visible_y)
......@@ -2029,7 +2039,13 @@ pos_visible_p (struct window *w, ptrdiff_t charpos, int *x, int *y,
RESTORE_IT (&it2, &it2, it2data);
move_it_to (&it2, charpos, -1, -1, -1, MOVE_TO_POS);
*x = it2.current_x;
*y = it2.current_y + it2.max_ascent - it2.ascent;
if (it2.ascent == 0 && it2.what == IT_IMAGE
&& it2.method != GET_FROM_IMAGE
&& it2.image_id < 0
&& it2.max_ascent > 0)
*y = it2.current_y;
else
*y = it2.current_y + it2.max_ascent - it2.ascent;
*rtop = max (0, -it2.current_y);
*rbot = max (0, ((it2.current_y + it2.max_ascent + it2.max_descent)
- it.last_visible_y));
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment