diff options
| -rw-r--r-- | configure.ac | 2 | ||||
| -rw-r--r-- | doc/lispref/edebug.texi | 1 | ||||
| -rw-r--r-- | doc/lispref/internals.texi | 8 | ||||
| -rw-r--r-- | doc/lispref/os.texi | 25 | ||||
| -rw-r--r-- | doc/lispref/windows.texi | 20 | ||||
| -rw-r--r-- | src/conf_post.h | 8 | ||||
| -rw-r--r-- | src/dispnew.c | 7 | ||||
| -rw-r--r-- | src/gtkutil.c | 3 | ||||
| -rw-r--r-- | src/nsterm.m | 1 | ||||
| -rw-r--r-- | src/window.c | 4 | ||||
| -rw-r--r-- | src/xdisp.c | 58 |
11 files changed, 83 insertions, 54 deletions
diff --git a/configure.ac b/configure.ac index df910280b43..bfd9d5d177c 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -361,7 +361,7 @@ OPTION_DEFAULT_ON([xft],[don't use XFT for anti aliased fonts]) | |||
| 361 | OPTION_DEFAULT_ON([libotf],[don't use libotf for OpenType font support]) | 361 | OPTION_DEFAULT_ON([libotf],[don't use libotf for OpenType font support]) |
| 362 | OPTION_DEFAULT_ON([m17n-flt],[don't use m17n-flt for text shaping]) | 362 | OPTION_DEFAULT_ON([m17n-flt],[don't use m17n-flt for text shaping]) |
| 363 | 363 | ||
| 364 | OPTION_DEFAULT_ON([toolkit-scroll-bars],[don't use Motif or Xaw3d scroll bars]) | 364 | OPTION_DEFAULT_ON([toolkit-scroll-bars],[don't use Motif/Xaw3d/GTK toolkit scroll bars]) |
| 365 | OPTION_DEFAULT_ON([xaw3d],[don't use Xaw3d]) | 365 | OPTION_DEFAULT_ON([xaw3d],[don't use Xaw3d]) |
| 366 | OPTION_DEFAULT_ON([xim],[at runtime, default X11 XIM to off]) | 366 | OPTION_DEFAULT_ON([xim],[at runtime, default X11 XIM to off]) |
| 367 | AC_ARG_WITH([ns],[AS_HELP_STRING([--with-ns], | 367 | AC_ARG_WITH([ns],[AS_HELP_STRING([--with-ns], |
diff --git a/doc/lispref/edebug.texi b/doc/lispref/edebug.texi index b1a65117167..2aace03a681 100644 --- a/doc/lispref/edebug.texi +++ b/doc/lispref/edebug.texi | |||
| @@ -1319,7 +1319,6 @@ succeeds. | |||
| 1319 | 1319 | ||
| 1320 | @item &define | 1320 | @item &define |
| 1321 | @c @kindex &define @r{(Edebug)} | 1321 | @c @kindex &define @r{(Edebug)} |
| 1322 | |||
| 1323 | Indicates that the specification is for a defining form. Edebug's | 1322 | Indicates that the specification is for a defining form. Edebug's |
| 1324 | definition of a defining form is a form containing one or more code | 1323 | definition of a defining form is a form containing one or more code |
| 1325 | forms which are saved and executed later, after the execution of the | 1324 | forms which are saved and executed later, after the execution of the |
diff --git a/doc/lispref/internals.texi b/doc/lispref/internals.texi index 0679537844e..27bfbe8bd85 100644 --- a/doc/lispref/internals.texi +++ b/doc/lispref/internals.texi | |||
| @@ -1176,12 +1176,12 @@ it does when Lisp code encounters the same situations. | |||
| 1176 | @end deftypefn | 1176 | @end deftypefn |
| 1177 | 1177 | ||
| 1178 | After writing your C code for a module function, you should make a | 1178 | After writing your C code for a module function, you should make a |
| 1179 | Lisp function object from it using @code{make_function}. This is | 1179 | Lisp function object from it using the @code{make_function} function, |
| 1180 | whose pointer is provided in the environment (recall that the pointer | ||
| 1181 | to the environment is returned by @code{get_environment}). This is | ||
| 1180 | normally done in the module initialization function (@pxref{module | 1182 | normally done in the module initialization function (@pxref{module |
| 1181 | initialization function}), after verifying the @acronym{API} | 1183 | initialization function}), after verifying the @acronym{API} |
| 1182 | compatibility, and uses the pointer to @code{make_function} provided | 1184 | compatibility. |
| 1183 | in the environment (recall that the pointer to the environment is | ||
| 1184 | returned by @code{get_environment}). | ||
| 1185 | 1185 | ||
| 1186 | @deftypefn Function emacs_value make_function (emacs_env *@var{env}, ptrdiff_t @var{min_arity}, ptrdiff_t @var{max_arity}, subr @var{func}, const char *@var{docstring}, void *@var{data}) | 1186 | @deftypefn Function emacs_value make_function (emacs_env *@var{env}, ptrdiff_t @var{min_arity}, ptrdiff_t @var{max_arity}, subr @var{func}, const char *@var{docstring}, void *@var{data}) |
| 1187 | @vindex emacs_variadic_function | 1187 | @vindex emacs_variadic_function |
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi index d74fec5cfd9..cb337573259 100644 --- a/doc/lispref/os.texi +++ b/doc/lispref/os.texi | |||
| @@ -112,24 +112,29 @@ activate the packages in the latter case, @code{package-activate-all} | |||
| 112 | should be called explicitly (e.g., via the @samp{--funcall} option). | 112 | should be called explicitly (e.g., via the @samp{--funcall} option). |
| 113 | 113 | ||
| 114 | @vindex initial-window-system@r{, and startup} | 114 | @vindex initial-window-system@r{, and startup} |
| 115 | @vindex window-system-initialization-alist | 115 | @findex window-system-initialization |
| 116 | @item | 116 | @item |
| 117 | If not running in batch mode, it initializes the window system that | 117 | If not running in batch mode, it initializes the window system that |
| 118 | the variable @code{initial-window-system} specifies (@pxref{Window | 118 | the variable @code{initial-window-system} specifies (@pxref{Window |
| 119 | Systems, initial-window-system}). The initialization function for | 119 | Systems, initial-window-system}). The initialization function, |
| 120 | each supported window system is specified by | 120 | @code{window-system-initialization}, is a @dfn{generic function} |
| 121 | @code{window-system-initialization-alist}. If the value | 121 | (@pxref{Generic Functions}) whose actual implementation is different |
| 122 | of @code{initial-window-system} is @var{windowsystem}, then the | 122 | for each supported window system. If the value of |
| 123 | appropriate initialization function is defined in the file | 123 | @code{initial-window-system} is @var{windowsystem}, then the |
| 124 | @file{term/@var{windowsystem}-win.el}. This file should have been | 124 | appropriate implementation of the initialization function is defined |
| 125 | compiled into the Emacs executable when it was built. | 125 | in the file @file{term/@var{windowsystem}-win.el}. This file should |
| 126 | have been compiled into the Emacs executable when it was built. | ||
| 126 | 127 | ||
| 127 | @item | 128 | @item |
| 128 | It runs the normal hook @code{before-init-hook}. | 129 | It runs the normal hook @code{before-init-hook}. |
| 129 | 130 | ||
| 130 | @item | 131 | @item |
| 131 | If appropriate, it creates a graphical frame. This is not done in | 132 | If appropriate, it creates a graphical frame. As part of creating the |
| 132 | batch (noninteractive) or daemon mode. | 133 | graphical frame, it initializes the window system specified by |
| 134 | @code{initial-frame-alist} and @code{default-frame-alist} | ||
| 135 | (@pxref{Initial Parameters}) for the graphical frame, by calling the | ||
| 136 | @code{window-system-initialization} function for that window system. | ||
| 137 | This is not done in batch (noninteractive) or daemon mode. | ||
| 133 | 138 | ||
| 134 | @item | 139 | @item |
| 135 | It initializes the initial frame's faces, and sets up the menu bar | 140 | It initializes the initial frame's faces, and sets up the menu bar |
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index 7cfa5ead5f1..52bfbde41c6 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi | |||
| @@ -4212,18 +4212,20 @@ point at the middle, top, and bottom of the window. | |||
| 4212 | @cindex vertical scroll position | 4212 | @cindex vertical scroll position |
| 4213 | 4213 | ||
| 4214 | @dfn{Vertical fractional scrolling} means shifting text in a window | 4214 | @dfn{Vertical fractional scrolling} means shifting text in a window |
| 4215 | up or down by a specified multiple or fraction of a line. Each window | 4215 | up or down by a specified multiple or fraction of a line. Emacs uses |
| 4216 | has a @dfn{vertical scroll position}, which is a number, never less than | 4216 | it, for example, on images and screen lines which are taller than the |
| 4217 | zero. It specifies how far to raise the contents of the window. | 4217 | window. Each window has a @dfn{vertical scroll position}, which is a |
| 4218 | Raising the window contents generally makes all or part of some lines | 4218 | number, never less than zero. It specifies how far to raise the |
| 4219 | disappear off the top, and all or part of some other lines appear at the | 4219 | contents of the window when displaying them. Raising the window |
| 4220 | bottom. The usual value is zero. | 4220 | contents generally makes all or part of some lines disappear off the |
| 4221 | top, and all or part of some other lines appear at the bottom. The | ||
| 4222 | usual value is zero. | ||
| 4221 | 4223 | ||
| 4222 | The vertical scroll position is measured in units of the normal line | 4224 | The vertical scroll position is measured in units of the normal line |
| 4223 | height, which is the height of the default font. Thus, if the value is | 4225 | height, which is the height of the default font. Thus, if the value is |
| 4224 | .5, that means the window contents are scrolled up half the normal line | 4226 | .5, that means the window contents will be scrolled up half the normal |
| 4225 | height. If it is 3.3, that means the window contents are scrolled up | 4227 | line height. If it is 3.3, that means the window contents are scrolled |
| 4226 | somewhat over three times the normal line height. | 4228 | up somewhat over three times the normal line height. |
| 4227 | 4229 | ||
| 4228 | What fraction of a line the vertical scrolling covers, or how many | 4230 | What fraction of a line the vertical scrolling covers, or how many |
| 4229 | lines, depends on what the lines contain. A value of .5 could scroll a | 4231 | lines, depends on what the lines contain. A value of .5 could scroll a |
diff --git a/src/conf_post.h b/src/conf_post.h index 683a96f9368..2f8b26491b5 100644 --- a/src/conf_post.h +++ b/src/conf_post.h | |||
| @@ -55,9 +55,11 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ | |||
| 55 | #endif | 55 | #endif |
| 56 | 56 | ||
| 57 | /* The type of bool bitfields. Needed to compile Objective-C with | 57 | /* The type of bool bitfields. Needed to compile Objective-C with |
| 58 | standard GCC. It was also needed to port to pre-C99 compilers, | 58 | standard GCC, and to make sure adjacent bool_bf fields are packed |
| 59 | although we don't care about that any more. */ | 59 | into the same 1-, 2-, or 4-byte allocation unit in the MinGW |
| 60 | #if NS_IMPL_GNUSTEP | 60 | builds. It was also needed to port to pre-C99 compilers, although |
| 61 | we don't care about that any more. */ | ||
| 62 | #if NS_IMPL_GNUSTEP || defined(__MINGW32__) | ||
| 61 | typedef unsigned int bool_bf; | 63 | typedef unsigned int bool_bf; |
| 62 | #else | 64 | #else |
| 63 | typedef bool bool_bf; | 65 | typedef bool bool_bf; |
diff --git a/src/dispnew.c b/src/dispnew.c index 798413d091c..8742d584930 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -4123,7 +4123,12 @@ scrolling_window (struct window *w, bool header_line_p) | |||
| 4123 | } | 4123 | } |
| 4124 | 4124 | ||
| 4125 | #ifdef HAVE_XWIDGETS | 4125 | #ifdef HAVE_XWIDGETS |
| 4126 | /* Currently this seems needed to detect xwidget movement reliably. */ | 4126 | /* Currently this seems needed to detect xwidget movement reliably. |
| 4127 | This is most probably because an xwidget glyph is represented in | ||
| 4128 | struct glyph's 'union u' by a pointer to a struct, which takes 8 | ||
| 4129 | bytes in 64-bit builds, and thus the comparison of u.val values | ||
| 4130 | done by GLYPH_EQUAL_P doesn't work reliably, since it assumes the | ||
| 4131 | size of the union is 4 bytes. FIXME. */ | ||
| 4127 | return 0; | 4132 | return 0; |
| 4128 | #endif | 4133 | #endif |
| 4129 | 4134 | ||
diff --git a/src/gtkutil.c b/src/gtkutil.c index 6212e1af4e8..da4a0ae13df 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c | |||
| @@ -1509,6 +1509,7 @@ xg_set_background_color (struct frame *f, unsigned long bg) | |||
| 1509 | block_input (); | 1509 | block_input (); |
| 1510 | xg_set_widget_bg (f, FRAME_GTK_WIDGET (f), FRAME_BACKGROUND_PIXEL (f)); | 1510 | xg_set_widget_bg (f, FRAME_GTK_WIDGET (f), FRAME_BACKGROUND_PIXEL (f)); |
| 1511 | 1511 | ||
| 1512 | #ifdef USE_TOOLKIT_SCROLL_BARS | ||
| 1512 | Lisp_Object bar; | 1513 | Lisp_Object bar; |
| 1513 | for (bar = FRAME_SCROLL_BARS (f); | 1514 | for (bar = FRAME_SCROLL_BARS (f); |
| 1514 | !NILP (bar); | 1515 | !NILP (bar); |
| @@ -1519,7 +1520,7 @@ xg_set_background_color (struct frame *f, unsigned long bg) | |||
| 1519 | GtkWidget *webox = gtk_widget_get_parent (scrollbar); | 1520 | GtkWidget *webox = gtk_widget_get_parent (scrollbar); |
| 1520 | xg_set_widget_bg (f, webox, FRAME_BACKGROUND_PIXEL (f)); | 1521 | xg_set_widget_bg (f, webox, FRAME_BACKGROUND_PIXEL (f)); |
| 1521 | } | 1522 | } |
| 1522 | 1523 | #endif | |
| 1523 | unblock_input (); | 1524 | unblock_input (); |
| 1524 | } | 1525 | } |
| 1525 | } | 1526 | } |
diff --git a/src/nsterm.m b/src/nsterm.m index 68ad64660ca..1ef7f5ab516 100644 --- a/src/nsterm.m +++ b/src/nsterm.m | |||
| @@ -2848,6 +2848,7 @@ ns_copy_bits (struct frame *f, NSRect src, NSRect dest) | |||
| 2848 | [FRAME_NS_VIEW (f) scrollRect: src | 2848 | [FRAME_NS_VIEW (f) scrollRect: src |
| 2849 | by: NSMakeSize (dest.origin.x - src.origin.x, | 2849 | by: NSMakeSize (dest.origin.x - src.origin.x, |
| 2850 | dest.origin.y - src.origin.y)]; | 2850 | dest.origin.y - src.origin.y)]; |
| 2851 | [FRAME_NS_VIEW (f) setNeedsDisplay:YES]; | ||
| 2851 | } | 2852 | } |
| 2852 | } | 2853 | } |
| 2853 | 2854 | ||
diff --git a/src/window.c b/src/window.c index 6cdc52f90e6..20084a15c16 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -7362,6 +7362,8 @@ value. */) | |||
| 7362 | 7362 | ||
| 7363 | DEFUN ("window-vscroll", Fwindow_vscroll, Swindow_vscroll, 0, 2, 0, | 7363 | DEFUN ("window-vscroll", Fwindow_vscroll, Swindow_vscroll, 0, 2, 0, |
| 7364 | doc: /* Return the amount by which WINDOW is scrolled vertically. | 7364 | doc: /* Return the amount by which WINDOW is scrolled vertically. |
| 7365 | This takes effect when displaying tall lines or images. | ||
| 7366 | |||
| 7365 | If WINDOW is omitted or nil, it defaults to the selected window. | 7367 | If WINDOW is omitted or nil, it defaults to the selected window. |
| 7366 | Normally, value is a multiple of the canonical character height of WINDOW; | 7368 | Normally, value is a multiple of the canonical character height of WINDOW; |
| 7367 | optional second arg PIXELS-P means value is measured in pixels. */) | 7369 | optional second arg PIXELS-P means value is measured in pixels. */) |
| @@ -7384,6 +7386,8 @@ optional second arg PIXELS-P means value is measured in pixels. */) | |||
| 7384 | DEFUN ("set-window-vscroll", Fset_window_vscroll, Sset_window_vscroll, | 7386 | DEFUN ("set-window-vscroll", Fset_window_vscroll, Sset_window_vscroll, |
| 7385 | 2, 3, 0, | 7387 | 2, 3, 0, |
| 7386 | doc: /* Set amount by which WINDOW should be scrolled vertically to VSCROLL. | 7388 | doc: /* Set amount by which WINDOW should be scrolled vertically to VSCROLL. |
| 7389 | This takes effect when displaying tall lines or images. | ||
| 7390 | |||
| 7387 | WINDOW nil means use the selected window. Normally, VSCROLL is a | 7391 | WINDOW nil means use the selected window. Normally, VSCROLL is a |
| 7388 | non-negative multiple of the canonical character height of WINDOW; | 7392 | non-negative multiple of the canonical character height of WINDOW; |
| 7389 | optional third arg PIXELS-P non-nil means that VSCROLL is in pixels. | 7393 | optional third arg PIXELS-P non-nil means that VSCROLL is in pixels. |
diff --git a/src/xdisp.c b/src/xdisp.c index d61d421f08a..7b0ca477220 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -2302,7 +2302,10 @@ get_phys_cursor_geometry (struct window *w, struct glyph_row *row, | |||
| 2302 | ascent value, lest the hollow cursor looks funny. */ | 2302 | ascent value, lest the hollow cursor looks funny. */ |
| 2303 | y = w->phys_cursor.y; | 2303 | y = w->phys_cursor.y; |
| 2304 | ascent = row->ascent; | 2304 | ascent = row->ascent; |
| 2305 | if (row->ascent < glyph->ascent) | 2305 | /* The test for row at ZV is for when line numbers are displayed and |
| 2306 | point is at EOB: the cursor could then be smaller or larger than | ||
| 2307 | the default face's font. */ | ||
| 2308 | if (!row->ends_at_zv_p && row->ascent < glyph->ascent) | ||
| 2306 | { | 2309 | { |
| 2307 | y -= glyph->ascent - row->ascent; | 2310 | y -= glyph->ascent - row->ascent; |
| 2308 | ascent = glyph->ascent; | 2311 | ascent = glyph->ascent; |
| @@ -2312,6 +2315,9 @@ get_phys_cursor_geometry (struct window *w, struct glyph_row *row, | |||
| 2312 | h0 = min (FRAME_LINE_HEIGHT (f), row->visible_height); | 2315 | h0 = min (FRAME_LINE_HEIGHT (f), row->visible_height); |
| 2313 | 2316 | ||
| 2314 | h = max (h0, ascent + glyph->descent); | 2317 | h = max (h0, ascent + glyph->descent); |
| 2318 | /* Don't let the cursor exceed the dimensions of the row, so that | ||
| 2319 | the upper/lower side of the box aren't clipped. */ | ||
| 2320 | h = min (h, row->height); | ||
| 2315 | h0 = min (h0, ascent + glyph->descent); | 2321 | h0 = min (h0, ascent + glyph->descent); |
| 2316 | 2322 | ||
| 2317 | y0 = WINDOW_HEADER_LINE_HEIGHT (w); | 2323 | y0 = WINDOW_HEADER_LINE_HEIGHT (w); |
| @@ -21232,14 +21238,11 @@ maybe_produce_line_number (struct it *it) | |||
| 21232 | for (const char *p = lnum_buf; *p; p++) | 21238 | for (const char *p = lnum_buf; *p; p++) |
| 21233 | { | 21239 | { |
| 21234 | /* For continuation lines and lines after ZV, instead of a line | 21240 | /* For continuation lines and lines after ZV, instead of a line |
| 21235 | number, produce a blank prefix of the same width. Use the | 21241 | number, produce a blank prefix of the same width. */ |
| 21236 | default face for the blank field beyond ZV. */ | 21242 | if (lnum_face_id != current_lnum_face_id |
| 21237 | if (beyond_zv) | 21243 | && (EQ (Vdisplay_line_numbers, Qvisual) |
| 21238 | tem_it.face_id = it->base_face_id; | 21244 | ? this_line == 0 |
| 21239 | else if (lnum_face_id != current_lnum_face_id | 21245 | : this_line == it->pt_lnum)) |
| 21240 | && (EQ (Vdisplay_line_numbers, Qvisual) | ||
| 21241 | ? this_line == 0 | ||
| 21242 | : this_line == it->pt_lnum)) | ||
| 21243 | tem_it.face_id = current_lnum_face_id; | 21246 | tem_it.face_id = current_lnum_face_id; |
| 21244 | else | 21247 | else |
| 21245 | tem_it.face_id = lnum_face_id; | 21248 | tem_it.face_id = lnum_face_id; |
| @@ -21292,23 +21295,30 @@ maybe_produce_line_number (struct it *it) | |||
| 21292 | } | 21295 | } |
| 21293 | } | 21296 | } |
| 21294 | 21297 | ||
| 21295 | /* Update IT's metrics due to glyphs produced for line numbers. */ | 21298 | /* Update IT's metrics due to glyphs produced for line numbers. |
| 21296 | if (it->glyph_row) | 21299 | Don't do that for rows beyond ZV, to avoid displaying a cursor of |
| 21300 | different dimensions there. */ | ||
| 21301 | if (!beyond_zv) | ||
| 21297 | { | 21302 | { |
| 21298 | struct glyph_row *row = it->glyph_row; | 21303 | if (it->glyph_row) |
| 21304 | { | ||
| 21305 | struct glyph_row *row = it->glyph_row; | ||
| 21299 | 21306 | ||
| 21300 | it->max_ascent = max (row->ascent, tem_it.max_ascent); | 21307 | it->max_ascent = max (row->ascent, tem_it.max_ascent); |
| 21301 | it->max_descent = max (row->height - row->ascent, tem_it.max_descent); | 21308 | it->max_descent = max (row->height - row->ascent, tem_it.max_descent); |
| 21302 | it->max_phys_ascent = max (row->phys_ascent, tem_it.max_phys_ascent); | 21309 | it->max_phys_ascent = max (row->phys_ascent, tem_it.max_phys_ascent); |
| 21303 | it->max_phys_descent = max (row->phys_height - row->phys_ascent, | 21310 | it->max_phys_descent = max (row->phys_height - row->phys_ascent, |
| 21304 | tem_it.max_phys_descent); | 21311 | tem_it.max_phys_descent); |
| 21305 | } | 21312 | } |
| 21306 | else | 21313 | else |
| 21307 | { | 21314 | { |
| 21308 | it->max_ascent = max (it->max_ascent, tem_it.max_ascent); | 21315 | it->max_ascent = max (it->max_ascent, tem_it.max_ascent); |
| 21309 | it->max_descent = max (it->max_descent, tem_it.max_descent); | 21316 | it->max_descent = max (it->max_descent, tem_it.max_descent); |
| 21310 | it->max_phys_ascent = max (it->max_phys_ascent, tem_it.max_phys_ascent); | 21317 | it->max_phys_ascent = max (it->max_phys_ascent, |
| 21311 | it->max_phys_descent = max (it->max_phys_descent, tem_it.max_phys_descent); | 21318 | tem_it.max_phys_ascent); |
| 21319 | it->max_phys_descent = max (it->max_phys_descent, | ||
| 21320 | tem_it.max_phys_descent); | ||
| 21321 | } | ||
| 21312 | } | 21322 | } |
| 21313 | 21323 | ||
| 21314 | it->line_number_produced_p = true; | 21324 | it->line_number_produced_p = true; |