summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2014-09-22 15:20:45 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2014-09-22 15:20:45 -0400
commit9949231fb06aa4a2dfa536e9d5125a81424db3a7 (patch)
treea2259e8489127b8685097a20a3fd3d7be222d9fe
parent298dfce8ac018aca6f8f1a38d7199cc28bfaf7fd (diff)
parentfc5ebc3f497a152132407d57a14cce147d59d29c (diff)
Merge from emacs-24
-rw-r--r--ChangeLog15
-rw-r--r--configure.ac10
-rw-r--r--lisp/ChangeLog14
-rw-r--r--lisp/cedet/ChangeLog6
-rw-r--r--lisp/cedet/ede/emacs.el9
-rw-r--r--lisp/url/ChangeLog6
-rw-r--r--lisp/url/url-http.el4
-rw-r--r--lisp/url/url.el4
-rw-r--r--lisp/window.el10
-rw-r--r--src/ChangeLog230
-rw-r--r--src/dispextern.h4
-rw-r--r--src/eval.c60
-rw-r--r--src/frame.c13
-rw-r--r--src/image.c6
-rw-r--r--src/lisp.h3
-rw-r--r--src/macfont.m31
-rw-r--r--src/unexmacosx.c4
-rw-r--r--src/w32term.c13
-rw-r--r--src/xdisp.c62
-rw-r--r--src/xterm.c20
20 files changed, 342 insertions, 182 deletions
diff --git a/ChangeLog b/ChangeLog
index 597c2eb0f9..cd005c3d1d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-09-22 Jan Djärv <jan.h.d@swipnet.se>
+
+ * configure.ac: Increase headerpad_extra to 1000, update the comment
+ about load commands (Bug#18505).
+
2014-09-15 Eli Zaretskii <eliz@gnu.org>
* configure.ac (HAVE_SOUND): Check for mmsystem.h header that
@@ -1539,8 +1544,8 @@
2013-07-29 Michael Albinus <michael.albinus@gmx.de>
- * INSTALL (DETAILED BUILDING AND INSTALLATION): Add
- --without-file-notification to --without-all.
+ * INSTALL (DETAILED BUILDING AND INSTALLATION):
+ Add --without-file-notification to --without-all.
2013-07-29 Xue Fuqiao <xfq.free@gmail.com>
@@ -1813,8 +1818,8 @@
CONFIG_SITE for the MSYS build on MS-Windows.
(Makefile): Use $(CFG).
- * .bzrignore: Ignore *.res, *.tmp, and *.map. Remove
- src/emacs.res.
+ * .bzrignore: Ignore *.res, *.tmp, and *.map.
+ Remove src/emacs.res.
2013-05-16 Paul Eggert <eggert@cs.ucla.edu>
@@ -13428,7 +13433,7 @@
detail: -with-x... and --srcdir.
(options, boolean_opts): Delete; we don't have enough options to
make this worthwhile.
- (prefix, bindir, lisppath, datadir, libdir, lockdir): Deleted,
+ (prefix, bindir, lisppath, datadir, libdir, lockdir): Delete,
along with the code which supported them; these should be set as
arguments to the top-level make.
(config_h_opts): Since this no longer doubles as a list of option
diff --git a/configure.ac b/configure.ac
index 16b891f878..179a4a5fae 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4936,17 +4936,19 @@ case "$opsys" in
darwin)
## The -headerpad option tells ld (see man page) to leave room at the
## end of the header for adding load commands. Needed for dumping.
- ## 0x690 is the total size of 30 segment load commands (at 56
- ## each); under Cocoa 31 commands are required.
+ ## 0x1000 is enough for roughly 52 load commands on the x86_64
+ ## architecture (where they are 78 bytes each). The actual number of
+ ## load commands added is not consistent but normally ranges from
+ ## about 14 to about 34. Setting it high gets us plenty of slop and
+ ## only costs about 1.5K of wasted binary space.
+ headerpad_extra=1000
if test "$HAVE_NS" = "yes"; then
libs_nsgui="-framework AppKit"
if test "$NS_IMPL_COCOA" = "yes"; then
libs_nsgui="$libs_nsgui -framework IOKit"
fi
- headerpad_extra=6C8
else
libs_nsgui=
- headerpad_extra=690
fi
LD_SWITCH_SYSTEM_TEMACS="-fno-pie -prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra"
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index eb23aaf766..271be39eea 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
+2014-09-22 Kan-Ru Chen <kanru@kanru.info>
+
+ * window.el (fit-window-to-buffer): When counting buffer width,
+ count the whole visible buffer. Correctly convert the body-height
+ to pixel size for window-text-pixel-size (Bug#18498).
+
2014-09-22 Sam Steingold <sds@gnu.org>
* progmodes/sql.el (sql-product-alist): Improve the Vertica entry.
@@ -191,8 +197,8 @@
(pcase--expand): Use it.
(pcase-exhaustive): New macro. (Bug#16567)
- * emacs-lisp/lisp-mode.el (lisp-el-font-lock-keywords-2): Add
- pcase-exhaustive.
+ * emacs-lisp/lisp-mode.el (lisp-el-font-lock-keywords-2):
+ Add pcase-exhaustive.
2014-09-13 Eli Zaretskii <eliz@gnu.org>
@@ -349,8 +355,8 @@
2014-09-05 Martin Rudalics <rudalics@gmx.at>
- * scroll-bar.el (horizontal-scroll-bars-available-p): New
- function.
+ * scroll-bar.el (horizontal-scroll-bars-available-p):
+ New function.
(horizontal-scroll-bar-mode): Rewrite using
horizontal-scroll-bars-available-p.
* menu-bar.el (menu-bar-showhide-scroll-bar-menu): Rewrite using
diff --git a/lisp/cedet/ChangeLog b/lisp/cedet/ChangeLog
index 820e75260a..9aabc9c9e0 100644
--- a/lisp/cedet/ChangeLog
+++ b/lisp/cedet/ChangeLog
@@ -1,3 +1,9 @@
+2014-09-22 David Engster <deng@randomsample.de>
+
+ * ede/emacs.el (ede-emacs-version): Do not call 'egrep' to
+ determine Emacs version (it was dead code anyway). Make sure that
+ configure.ac or configure.in exist. (Bug#18476)
+
2014-06-19 Stefan Monnier <monnier@iro.umontreal.ca>
* semantic/ia.el (semantic-ia-complete-symbol-menu): Use posn-at-point
diff --git a/lisp/cedet/ede/emacs.el b/lisp/cedet/ede/emacs.el
index 43f16da8a7..76925a6671 100644
--- a/lisp/cedet/ede/emacs.el
+++ b/lisp/cedet/ede/emacs.el
@@ -80,12 +80,6 @@ Return a tuple of ( EMACSNAME . VERSION )."
(with-current-buffer buff
(erase-buffer)
(setq default-directory (file-name-as-directory dir))
- (or (file-exists-p configure_ac)
- (setq configure_ac "configure.in"))
- ;(call-process "egrep" nil buff nil "-n" "-e" "^version=" "Makefile")
- (call-process "egrep" nil buff nil "-n" "-e" "AC_INIT" configure_ac)
- (goto-char (point-min))
- ;(re-search-forward "version=\\([0-9.]+\\)")
(cond
;; Maybe XEmacs?
((file-exists-p "version.sh")
@@ -113,7 +107,8 @@ m4_define(\\[SXEM4CS_BETA_VERSION\\], \\[\\([0-9]+\\)\\])")
;; Insert other Emacs here...
;; Vaguely recent version of GNU Emacs?
- (t
+ ((or (file-exists-p configure_ac)
+ (file-exists-p (setq configure_ac "configure.in")))
(insert-file-contents configure_ac)
(goto-char (point-min))
(re-search-forward "AC_INIT(\\(?:GNU \\)?[eE]macs,\\s-*\\([0-9.]+\\)\\s-*[,)]")
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog
index 9554c6e519..b99f57cfbf 100644
--- a/lisp/url/ChangeLog
+++ b/lisp/url/ChangeLog
@@ -1,3 +1,9 @@
+2014-09-22 Dmitry Gutov <dgutov@yandex.ru>
+
+ * url.el (url-retrieve-internal): Clarify the docstring.
+
+ * url-http.el (url-http): Same. (Bug#18116)
+
2014-08-07 Reuben Thomas <rrt@sc3d.org>
* url-handlers.el: Remove a comment about VMS, which we no longer
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el
index 608a865be7..cba4c6fbc0 100644
--- a/lisp/url/url-http.el
+++ b/lisp/url/url-http.el
@@ -1171,8 +1171,8 @@ the end of the document."
"Retrieve URL via HTTP asynchronously.
URL must be a parsed URL. See `url-generic-parse-url' for details.
-When retrieval is completed, execute the function CALLBACK, using
-the arguments listed in CBARGS. The first element in CBARGS
+When retrieval is completed, execute the function CALLBACK, passing it
+an updated value of CBARGS as arguments. The first element in CBARGS
should be a plist describing what has happened so far during the
request, as described in the docstring of `url-retrieve' (if in
doubt, specify nil).
diff --git a/lisp/url/url.el b/lisp/url/url.el
index 620593a9a8..4594ab6a7f 100644
--- a/lisp/url/url.el
+++ b/lisp/url/url.el
@@ -170,8 +170,8 @@ URL-encoded before it's used."
(defun url-retrieve-internal (url callback cbargs &optional silent
inhibit-cookies)
"Internal function; external interface is `url-retrieve'.
-CBARGS is the list of arguments that the callback function will
-receive; its first element should be a plist specifying what has
+The callback function will receive an updated value of CBARGS as
+arguments; its first element should be a plist specifying what has
happened so far during the request, as described in the docstring
of `url-retrieve' (if in doubt, specify nil).
diff --git a/lisp/window.el b/lisp/window.el
index c19392f1fe..5ac04c7e99 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -7377,10 +7377,10 @@ accessible position."
max-width))
(+ total-width (window-max-delta
nil t nil nil nil nil pixelwise))))
- ;; When fitting vertically, assume that WINDOW's start
- ;; position remains unaltered. WINDOW can't get wider
- ;; than its frame's pixel width, its height remains
- ;; unaltered.
+ ;; When fitting horizontally, assume that WINDOW's
+ ;; start position remains unaltered. WINDOW can't get
+ ;; wider than its frame's pixel width, its height
+ ;; remains unaltered.
(width (+ (car (window-text-pixel-size
nil (window-start) (point-max)
(frame-pixel-width)
@@ -7389,7 +7389,7 @@ accessible position."
;; overshoots when the first line below
;; the bottom is wider than the window.
(* body-height
- (if pixelwise char-height 1))))
+ (if pixelwise 1 char-height))))
(window-right-divider-width))))
(unless pixelwise
(setq width (/ (+ width char-width -1) char-width)))
diff --git a/src/ChangeLog b/src/ChangeLog
index 5aad2f9183..09426cfbf9 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,75 @@
+2014-09-22 Dmitry Antipov <dmantipov@yandex.ru>
+
+ On OSX, do not free font-specific data more than once (Bug#18501).
+ * macfont.m (macfont_close): Release and free font-specific data
+ only if it wasn't previously freed.
+
+2014-09-22 David Caldwell <david@porkrind.org> (tiny change)
+
+ * unexmacosx.c (dump_it): Improve error message.
+
+2014-09-22 Juri Linkov <juri@jurta.org>
+
+ * image.c (imagemagick_load_image): Add delay to imagemagick metadata.
+ (Bug#10747, bug#18334)
+
+2014-09-22 Eli Zaretskii <eliz@gnu.org>
+
+ * frame.c (Fmouse_position, Fset_mouse_position): Clarify the
+ units in which the position is measured. (Bug#18493)
+
+ * xdisp.c (redisplay_internal): Force redisplay of all windows
+ that show a buffer whose narrowing has changed. (Bug#18490)
+
+2014-09-22 Eli Zaretskii <eliz@gnu.org>
+
+ * xterm.c (x_draw_hollow_cursor, x_draw_bar_cursor):
+ * w32term.c (x_draw_hollow_cursor, x_draw_bar_cursor): In R2L
+ lines, draw the hollow-box and hbar cursors on the right side of
+ cursor-glyph. Thanks to martin rudalics <rudalics@gmx.at> for
+ testing on X.
+
+ * xterm.c (x_draw_stretch_glyph_string):
+ * w32term.c (x_draw_stretch_glyph_string): Fix a thinko that
+ caused the block cursor to disappear on a TAB in R2L lines in
+ every window except the leftmost one. Reported by Martin Rudalics
+ <rudalics@gmx.at>.
+
+2014-09-22 Dmitry Antipov <dmantipov@yandex.ru>
+
+ Always use matched specpdl entry to record call arguments (Bug#18473).
+ * lisp.h (record_in_backtrace): Adjust prototype.
+ * eval.c (record_in_backtrace): Return current specpdl level.
+ (set_backtrace_args, set_backtrace_nargs): Merge. Adjust all users.
+ (eval_sub, Ffuncall): Record call arguments in matched specpdl
+ entry and use that entry in call to backtrace_debug_on_exit.
+ (apply_lambda): Likewise. Get current specpdl level as 3rd arg.
+ (do_debug_on_call): Get current specpdl level as 2nd arg.
+
+ Prefer ptrdiff_t to int and avoid integer overflows.
+ * fileio.c (make_temp_name):
+ * font.c (font_parse_family_registry): Avoid integer
+ overflow on string size calculation.
+ * data.c (Faset): Likewise for byte index.
+
+2014-09-22 Eli Zaretskii <eliz@gnu.org>
+
+ Fix display of R2L lines in partial-width windows.
+ * xdisp.c (init_iterator): Don't use it->bidi_p before it is
+ assigned the correct value.
+ (extend_face_to_end_of_line): Account for truncation and
+ continuation glyphs in R2L rows when one of the fringes is not
+ displayed.
+ (display_line): Don't assign negative X offset to a row if we are
+ going to produce a truncation glyph for it. When handling
+ truncated R2L rows, consider the width of the left fringe instead
+ of the right one.
+ (produce_special_glyphs): Fix bogus assignments.
+
+2014-09-22 Eli Zaretskii <eliz@gnu.org>
+
+ * w32.c (fcntl): Support O_NONBLOCK fcntl on the write side of pipes.
+
2014-09-22 Eli Zaretskii <eliz@gnu.org>
* fileio.c (Fexpand_file_name) [DOS_NT]: Make sure newdirlim is
@@ -103,17 +175,17 @@
file names properly displayed.
(do_play_sound) [WINDOWSNT]: Use Unicode APIs to play sound files
when w32-unicode-filenames is non-nil, but not on Windows 9X,
- where these APIs are not available even in UNICOWS.DLL. Improve
- the format of error messages and include the file name in them
+ where these APIs are not available even in UNICOWS.DLL.
+ Improve the format of error messages and include the file name in them
where appropriate.
(Fplay_sound_internal) [WINDOWSNT]: Make the MS-Windows branch
call play-sound-functions, per documentation.
- * w32.c (w32_get_long_filename, w32_get_short_filename): Constify
- the input file name arguments.
+ * w32.c (w32_get_long_filename, w32_get_short_filename):
+ Constify the input file name arguments.
- * w32.h (w32_get_long_filename, w32_get_short_filename): Update
- prototypes.
+ * w32.h (w32_get_long_filename, w32_get_short_filename):
+ Update prototypes.
2014-09-15 Dmitry Antipov <dmantipov@yandex.ru>
@@ -220,8 +292,8 @@
* lread.c (readevalloop_eager_expand_eval): Add GCPRO and fix
bootstrap broken if GC_MARK_STACK == GC_USE_GCPROS_AS_BEFORE.
- Remove redundant GCPROs around Ffuncall and Fapply calls. This
- is safe because Ffuncall protects all of its arguments by itself.
+ Remove redundant GCPROs around Ffuncall and Fapply calls.
+ This is safe because Ffuncall protects all of its arguments by itself.
* charset.c (map_charset_for_dump): Remove redundant GCPRO.
* eval.c (Fapply, apply1, call0, call1, call2, call3, call4, call5)
(call6, call7): Likewise. Use compound literals where applicable.
@@ -511,8 +583,8 @@
2014-09-03 Martin Rudalics <rudalics@gmx.at>
* buffer.c (scroll-bar-height): Fix typo in doc-string.
- * frame.c (Vdefault_frame_horizontal_scroll_bars): Remove
- variable.
+ * frame.c (Vdefault_frame_horizontal_scroll_bars):
+ Remove variable.
* nsfns.m (Fx_create_frame):
* w32fns.c (Fx_create_frame):
* xfns.c (Fx_create_frame): Default horizontal scroll bars to
@@ -750,8 +822,8 @@
2014-08-28 Martin Rudalics <rudalics@gmx.at>
- * w32term.c (w32_horizontal_scroll_bar_handle_click): In
- `event->y' return entire range (the size of the scroll bar minus
+ * w32term.c (w32_horizontal_scroll_bar_handle_click):
+ In `event->y' return entire range (the size of the scroll bar minus
that of the thumb).
* xterm.c (xm_scroll_callback, xaw_jump_callback): In `whole'
return entire range (the scaled size of the scroll bar minus
@@ -771,8 +843,8 @@
* xdisp.c (display_line): Don't assume that the call to
reseat_at_next_visible_line_start ends up at a character
- immediately following the newline on the previous line. Avoids
- setting the ends_at_zv_p flag on screen lines that are not at or
+ immediately following the newline on the previous line.
+ Avoids setting the ends_at_zv_p flag on screen lines that are not at or
beyond ZV, which causes infloop in redisplay. For the details, see
http://lists.gnu.org/archive/html/emacs-devel/2014-08/msg00368.html.
@@ -796,8 +868,8 @@
(newlocale, wcscoll_l): Define substitutes for platforms that
lack them, so as to simplify the mainline code.
(str_collate): Simplify the code by assuming the above definitions.
- Use wcscoll_l, not uselocale, as uselocale is too fragile. For
- example, the old version left the Emacs in the wrong locale if
+ Use wcscoll_l, not uselocale, as uselocale is too fragile.
+ For example, the old version left the Emacs in the wrong locale if
wcscoll reported an error. Use 'int', not ptrdiff_t, for the int
result. Report an error if newlocale fails.
@@ -1016,8 +1088,8 @@
* term.c (OUTPUT, tty_set_terminal_modes)
(tty_set_terminal_window, tty_set_scroll_region)
(tty_clear_to_end, tty_write_glyphs, tty_write_glyphs_with_face)
- (tty_ins_del_lines, tty_menu_display, tty_menu_activate): Use
- FRAME_TOTAL_LINES instead of FRAME_LINES.
+ (tty_ins_del_lines, tty_menu_display, tty_menu_activate):
+ Use FRAME_TOTAL_LINES instead of FRAME_LINES.
(Fresume_tty): Use FRAME_TOTAL_LINES instead of FRAME_LINES.
Call change_frame_size with frame's menu bar lines subtracted
from height.
@@ -1068,14 +1140,14 @@
2014-08-04 Martin Rudalics <rudalics@gmx.at>
- * frame.h (FRAME_HAS_HORIZONTAL_SCROLL_BARS): Condition
- correctly according to toolkit used.
+ * frame.h (FRAME_HAS_HORIZONTAL_SCROLL_BARS):
+ Condition correctly according to toolkit used.
* frame.c (make_initial_frame, make_terminal_frame)
(x_set_horizontal_scroll_bars, x_set_scroll_bar_height)
(Vdefault_frame_horizontal_scroll_bars): Correctly condition
assignments according to presence of toolkit scrollbars.
- * window.h (WINDOW_HAS_HORIZONTAL_SCROLL_BAR): Condition
- correctly according to toolkit used.
+ * window.h (WINDOW_HAS_HORIZONTAL_SCROLL_BAR):
+ Condition correctly according to toolkit used.
* window.c (set_window_scroll_bars): Set horizontal scroll bar
only if toolkit supports it.
* w32term.c (w32_redeem_scroll_bar): Always redeem scroll bar if
@@ -1331,15 +1403,15 @@
(x_set_scroll_bar_height): Add external declarations.
* frame.c: (frame_inhibit_resize, frame_windows_min_size)
(adjust_frame_size): New functions.
- (make_frame): Initial horizontal_scroll_bars field. Use
- SET_FRAME_LINES. Don't allow horizontal scroll bar in
+ (make_frame): Initial horizontal_scroll_bars field.
+ Use SET_FRAME_LINES. Don't allow horizontal scroll bar in
minibuffer window.
(make_initial_frame, make_terminal_frame): No horizontal scroll
bar in initial and terminal frames. Use adjust_frame_size.
(Fframe_total_cols): Fix doc-string.
(Fframe_total_lines, Fscroll_bar_height): New Lisp functions.
- (Fset_frame_height, Fset_frame_width, Fset_frame_size): Rewrite
- using adjust_frame_size.
+ (Fset_frame_height, Fset_frame_width, Fset_frame_size):
+ Rewrite using adjust_frame_size.
(Qscroll_bar_height, Qhorizontal_scroll_bars)
(Qframe_windows_min_size): New symbols.
(x_set_frame_parameters): Remove call of check_frame_size.
@@ -1350,8 +1422,8 @@
(x_set_internal_border_width, x_set_vertical_scroll_bars)
(x_set_scroll_bar_width, x_set_right_divider_width)
(x_set_bottom_divider_width): Rewrite using adjust_frame_size.
- (x_set_horizontal_scroll_bars, x_set_scroll_bar_height): New
- functions.
+ (x_set_horizontal_scroll_bars, x_set_scroll_bar_height):
+ New functions.
(x_figure_window_size): Rewrite to make frame display the
expected number of lines.
(Vdefault_frame_scroll_bars): Rewrite doc-string.
@@ -1398,8 +1470,8 @@
compute_fringe_widths.
* term.c (Fresume_tty): When changing the size of a tty frame do
not pass height of menu bar.
- (clear_tty_hooks, set_tty_hooks): Clear
- horizontal_scroll_bar_hook.
+ (clear_tty_hooks, set_tty_hooks):
+ Clear horizontal_scroll_bar_hook.
(init_tty): Frame has no horizontal scroll bars.
* termhooks.h (enum scroll_bar_part): Add scroll_bar_move_ratio,
scroll_bar_before_handle, scroll_bar_horizontal_handle,
@@ -1408,25 +1480,25 @@
scroll_bar_to_rightmost entries.
(enum event_kind): Add HORIZONTAL_SCROLL_BAR_CLICK_EVENT
(struct terminal): Add set_horizontal_scroll_bar_hook.
- * w32console.c (initialize_w32_display): Clear
- horizontal_scroll_bar_hook.
+ * w32console.c (initialize_w32_display):
+ Clear horizontal_scroll_bar_hook.
* w32fns.c (x_set_mouse_color): Use FRAME_W32_DISPLAY instead of
FRAME_X_DISPLAY.
(x_clear_under_internal_border, x_set_internal_border_width):
New functions.
- (x_set_menu_bar_lines): Rewrite using frame_inhibit_resize. Set
- windows_or_buffers_changed when adding the menu bar.
+ (x_set_menu_bar_lines): Rewrite using frame_inhibit_resize.
+ Set windows_or_buffers_changed when adding the menu bar.
(x_set_tool_bar_lines): Rewrite using adjust_frame_size.
(x_change_tool_bar_height, x_set_scroll_bar_default_height)
(w32_createhscrollbar): New functions.
(w32_createscrollbar): Rename to w32_createvscrollbar.
(w32_createwindow): Init WND_HSCROLLBAR_INDEX.
(w32_name_of_message): Replace WM_EMACS_CREATESCROLLBAR by
- WM_EMACS_CREATEVSCROLLBAR and WM_EMACS_CREATEHSCROLLBAR. Add
- WM_EMACS_SHOWCURSOR.
+ WM_EMACS_CREATEVSCROLLBAR and WM_EMACS_CREATEHSCROLLBAR.
+ Add WM_EMACS_SHOWCURSOR.
(w32_wnd_proc): Handle WM_HSCROLL case. In WM_WINDOWPOSCHANGING
- case do not artificially impose WM size hints. Handle
- WM_EMACS_SHOWCURSOR case. Replace WM_EMACS_CREATESCROLLBAR case
+ case do not artificially impose WM size hints.
+ Handle WM_EMACS_SHOWCURSOR case. Replace WM_EMACS_CREATESCROLLBAR case
by WM_EMACS_CREATEVSCROLLBAR and WM_EMACS_CREATEHSCROLLBAR
cases.
(my_create_tip_window): Replace WND_SCROLLBAR_INDEX by
@@ -1445,8 +1517,8 @@
pass height of menu bar to change_frame_size.
* w32menu.c (set_frame_menubar): Rewrite using
frame_inhibit_resize.
- * w32term.h (struct w32_display_info): Add
- horizontal_scroll_bar_cursor and cursor_display_counter.
+ * w32term.h (struct w32_display_info):
+ Add horizontal_scroll_bar_cursor and cursor_display_counter.
(struct scroll_bar): Add horizontal.
(HORIZONTAL_SCROLL_BAR_INSIDE_HEIGHT)
(HORIZONTAL_SCROLL_BAR_LEFT_RANGE)
@@ -1456,8 +1528,8 @@
(HORIZONTAL_SCROLL_BAR_TOP_BORDER)
(HORIZONTAL_SCROLL_BAR_BOTTOM_BORDER)
(HORIZONTAL_SCROLL_BAR_MIN_HANDLE): New macros.
- (WM_EMACS_CREATEVSCROLLBAR, WM_EMACS_CREATEHSCROLLBAR): Define
- instead of WM_EMACS_CREATESCROLLBAR.
+ (WM_EMACS_CREATEVSCROLLBAR, WM_EMACS_CREATEHSCROLLBAR):
+ Define instead of WM_EMACS_CREATESCROLLBAR.
(WND_VSCROLLBAR_INDEX, WND_HSCROLLBAR_INDEX): Define instead of
WND_SCROLLBAR_INDEX.
* w32term.c (horizontal_scroll_bar_min_handle)
@@ -1476,18 +1548,18 @@
scrollbar cases.
(my_create_scrollbar): Replace with two new functions
my_create_vscrollbar and my_create_hscrollbar.
- (x_scroll_bar_create): New argument "horizontal". Update
- callers accordingly.
+ (x_scroll_bar_create): New argument "horizontal".
+ Update callers accordingly.
(x_scroll_bar_remove, w32_condemn_scroll_bars)
(w32_redeem_scroll_bar, x_scroll_bar_clear): Handle horizontal
scroll bar case.
(w32_read_socket): Handle WM_HSCROLL cae.
- (x_new_font): Don't recompute fringe widths. Use
- frame_inhibit_resize. Calculate new menu bar height iff we
+ (x_new_font): Don't recompute fringe widths.
+ Use frame_inhibit_resize. Calculate new menu bar height iff we
build without toolkit. Always clear under internal border.
(x_set_window_size): Don't check frame size or recompute
- fringes. Reset fullscreen status before applying sizes. Always
- resize as requested by pixelwise argument. Don't call
+ fringes. Reset fullscreen status before applying sizes.
+ Always resize as requested by pixelwise argument. Don't call
do_pending_window_change.
(x_wm_set_size_hint): Add call for FRAME_SCROLL_BAR_AREA_HEIGHT.
(w32_initialize_display_info): Initialize dpyinfo's
@@ -1513,8 +1585,8 @@
(WINDOW_TOPMOST_P, WINDOW_HAS_HORIZONTAL_SCROLL_BAR)
(WINDOW_CONFIG_SCROLL_BAR_HEIGHT)
(WINDOW_CONFIG_SCROLL_BAR_LINES)
- (WINDOW_SCROLL_BAR_LINES, WINDOW_SCROLL_BAR_AREA_HEIGHT): New
- macros.
+ (WINDOW_SCROLL_BAR_LINES, WINDOW_SCROLL_BAR_AREA_HEIGHT):
+ New macros.
(WINDOW_LEFT_FRINGE_COLS, WINDOW_RIGHT_FRINGE_COLS)
(WINDOW_FRINGE_COLS, WINDOW_FRINGE_EXTENDED_P): Remove macros.
(WINDOW_VERTICAL_SCROLL_BAR_TYPE)
@@ -1527,11 +1599,11 @@
(Fwindow_old_point, sanitize_window_sizes): New functions.
(Qwindow_sanitize_window_sizes): New symbol.
(window_body_height): Count in horizontal scroll bar.
- (set_window_hscroll, Fscroll_left, Fscroll_right): Set
- suspend_auto_hscroll slot.
+ (set_window_hscroll, Fscroll_left, Fscroll_right):
+ Set suspend_auto_hscroll slot.
(Fwindow_inside_edges): Count fringes pixelwise.
- (coordinates_in_window, Fcoordinates_in_window_p): Consider
- horizontal scroll bar.
+ (coordinates_in_window, Fcoordinates_in_window_p):
+ Consider horizontal scroll bar.
(check_frame_size, adjust_window_margins): Remove functions and
corresponding calls.
(set_window_buffer): Initialize old_pointm and horizontal scroll
@@ -1547,8 +1619,8 @@
(Fsplit_window_internal): Inherit horizontal scroll bar type and
height.
(Fdelete_window_internal): Unchain old_pointm marker.
- (window_scroll_pixel_based, Fscroll_other_window): Adjust
- old_pointm.
+ (window_scroll_pixel_based, Fscroll_other_window):
+ Adjust old_pointm.
(Fwindow_text_width, Fwindow_text_height): New argument
"pixelwise".
(struct saved_window): New fields, old_pointm, hscroll_whole,
@@ -1603,10 +1675,10 @@
(x_frame_parm_handlers): Add x_set_scroll_bar_height,
x_set_horizontal_scroll_bars, x_set_left_fringe,
x_set_right_fringe.
- * xmenu.c (update_frame_menubar, free_frame_menubar): Use
- adjust_frame_size.
- * xterm.h (struct x_display_info): Add
- horizontal_scroll_bar_cursor and Xatom_Horizontal_Scrollbar
+ * xmenu.c (update_frame_menubar, free_frame_menubar):
+ Use adjust_frame_size.
+ * xterm.h (struct x_display_info):
+ Add horizontal_scroll_bar_cursor and Xatom_Horizontal_Scrollbar
slots.
(struct scroll_bar): Add horizontal slot.
(HORIZONTAL_SCROLL_BAR_INSIDE_HEIGHT)
@@ -1629,15 +1701,15 @@
(x_set_toolkit_horizontal_scroll_bar_thumb)
(XTset_horizontal_scroll_bar, x_net_wm_state)
(x_horizontal_scroll_bar_report_motion): New functions.
- (xg_scroll_callback, x_scroll_bar_handle_click): Handle
- horizontal scroll bars.
+ (xg_scroll_callback, x_scroll_bar_handle_click):
+ Handle horizontal scroll bars.
(SCROLL_BAR_HORIZONTAL_NAME): Define.
(XTset_vertical_scroll_bar): Attempt to clear areas not covered
by scroll bar.
- (XTcondemn_scroll_bars, XTredeem_scroll_bar): Rewrite. Handle
- horizontal scroll bars.
- (handle_one_xevent): Handle horizontal scroll bar events. Call
- x_net_wm_state.
+ (XTcondemn_scroll_bars, XTredeem_scroll_bar): Rewrite.
+ Handle horizontal scroll bars.
+ (handle_one_xevent): Handle horizontal scroll bar events.
+ Call x_net_wm_state.
(x_set_window_size_1, x_wm_set_size_hint): Don't call
check_frame_size.
(x_set_window_size): Don't call check_frame_size and
@@ -1687,8 +1759,8 @@
2014-07-25 Eli Zaretskii <eliz@gnu.org>
- * w32term.h (current_popup_menu, menubar_in_use): Move
- declarations from w32term.c.
+ * w32term.h (current_popup_menu, menubar_in_use):
+ Move declarations from w32term.c.
2014-07-25 Martin Rudalics <rudalics@gmx.at>
@@ -1742,8 +1814,8 @@
* xterm.c (handle_one_xevent):
* gtkutil.c (xg_event_is_for_menubar):
* xfns.c (x_window) [USE_X_TOOLKIT]:
- * xmenu.c (set_frame_menubar, free_frame_menubar): Prefer
- to use FRAME_MENUBAR_HEIGHT.
+ * xmenu.c (set_frame_menubar, free_frame_menubar):
+ Prefer to use FRAME_MENUBAR_HEIGHT.
2014-07-21 Dmitry Antipov <dmantipov@yandex.ru>
@@ -1764,12 +1836,12 @@
2014-07-21 Eli Zaretskii <eliz@gnu.org>
- * w32select.c (setup_windows_coding_system): Apply
- CODING_ANNOTATION_MASK to the common_flags member of struct
+ * w32select.c (setup_windows_coding_system):
+ Apply CODING_ANNOTATION_MASK to the common_flags member of struct
coding_system. Reported by martin rudalics <rudalics@gmx.at>.
- * w16select.c (Fw16_get_clipboard_data): Apply
- CODING_ANNOTATION_MASK to the common_flags member of struct
+ * w16select.c (Fw16_get_clipboard_data):
+ Apply CODING_ANNOTATION_MASK to the common_flags member of struct
coding_system.
* xdisp.c (init_iterator): Initialize it->stop_charpos to the
@@ -1777,8 +1849,8 @@
(handle_invisible_prop): Record in it->stop_charpos the position
where the invisible text ends. (Bug#18035)
(hscroll_window_tree): Don't try hscrolling windows whose cursor
- row has zero buffer position as their start position. Reported by
- martin rudalics <rudalics@gmx.at>.
+ row has zero buffer position as their start position.
+ Reported by martin rudalics <rudalics@gmx.at>.
* xdisp.c (move_it_vertically_backward, move_it_by_lines): Prevent
infinite looping in redisplay when display lines don't have enough
@@ -2218,8 +2290,8 @@
are in sync with what the window wants.
(Bug#17892)
- * xdisp.c (display_line, display_mode_line): Call
- prepare_desired_row with additional arguments, as appropriate.
+ * xdisp.c (display_line, display_mode_line):
+ Call prepare_desired_row with additional arguments, as appropriate.
* dispextern.h (prepare_desired_row): Adjust prototype.
@@ -2308,7 +2380,7 @@
2014-06-28 K. Handa <handa@gnu.org>
- * coding.c (MAX_CHARBUF_SIZE): Renamed from CHARBUF_SIZE.
+ * coding.c (MAX_CHARBUF_SIZE): Rename from CHARBUF_SIZE.
(MIN_CHARBUF_SIZE): New macro.
(ALLOC_CONVERSION_WORK_AREA): New arg SIZE. Callers changed.
diff --git a/src/dispextern.h b/src/dispextern.h
index ebd4260d40..99396b1dee 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -2523,7 +2523,9 @@ struct it
/* First and last visible x-position in the display area. If window
is hscrolled by n columns, first_visible_x == n * FRAME_COLUMN_WIDTH
- (f), and last_visible_x == pixel width of W + first_visible_x. */
+ (f), and last_visible_x == pixel width of W + first_visible_x.
+ When truncation or continuation glyphs are produced due to lack of
+ fringes, last_visible_x excludes the space required for these glyphs. */
int first_visible_x, last_visible_x;
/* Last visible y-position + 1 in the display area without a mode
diff --git a/src/eval.c b/src/eval.c
index 5f54c10544..77b1db9539 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -104,7 +104,7 @@ union specbinding *backtrace_next (union specbinding *) EXTERNALLY_VISIBLE;
union specbinding *backtrace_top (void) EXTERNALLY_VISIBLE;
static Lisp_Object funcall_lambda (Lisp_Object, ptrdiff_t, Lisp_Object *);
-static Lisp_Object apply_lambda (Lisp_Object fun, Lisp_Object args);
+static Lisp_Object apply_lambda (Lisp_Object, Lisp_Object, ptrdiff_t);
static Lisp_Object
specpdl_symbol (union specbinding *pdl)
@@ -172,17 +172,11 @@ backtrace_debug_on_exit (union specbinding *pdl)
/* Functions to modify slots of backtrace records. */
static void
-set_backtrace_args (union specbinding *pdl, Lisp_Object *args)
+set_backtrace_args (union specbinding *pdl, Lisp_Object *args, ptrdiff_t nargs)
{
eassert (pdl->kind == SPECPDL_BACKTRACE);
pdl->bt.args = args;
-}
-
-static void
-set_backtrace_nargs (union specbinding *pdl, ptrdiff_t n)
-{
- eassert (pdl->kind == SPECPDL_BACKTRACE);
- pdl->bt.nargs = n;
+ pdl->bt.nargs = nargs;
}
static void
@@ -334,10 +328,10 @@ call_debugger (Lisp_Object arg)
}
static void
-do_debug_on_call (Lisp_Object code)
+do_debug_on_call (Lisp_Object code, ptrdiff_t count)
{
debug_on_next_call = 0;
- set_backtrace_debug_on_exit (specpdl_ptr - 1, true);
+ set_backtrace_debug_on_exit (specpdl + count, true);
call_debugger (list1 (code));
}
@@ -2035,9 +2029,11 @@ grow_specpdl (void)
}
}
-void
+ptrdiff_t
record_in_backtrace (Lisp_Object function, Lisp_Object *args, ptrdiff_t nargs)
{
+ ptrdiff_t count = SPECPDL_INDEX ();
+
eassert (nargs >= UNEVALLED);
specpdl_ptr->bt.kind = SPECPDL_BACKTRACE;
specpdl_ptr->bt.debug_on_exit = false;
@@ -2045,6 +2041,8 @@ record_in_backtrace (Lisp_Object function, Lisp_Object *args, ptrdiff_t nargs)
specpdl_ptr->bt.args = args;
specpdl_ptr->bt.nargs = nargs;
grow_specpdl ();
+
+ return count;
}
/* Eval a sub-expression of the current expression (i.e. in the same
@@ -2055,6 +2053,7 @@ eval_sub (Lisp_Object form)
Lisp_Object fun, val, original_fun, original_args;
Lisp_Object funcar;
struct gcpro gcpro1, gcpro2, gcpro3;
+ ptrdiff_t count;
if (SYMBOLP (form))
{
@@ -2092,10 +2091,10 @@ eval_sub (Lisp_Object form)
original_args = XCDR (form);
/* This also protects them from gc. */
- record_in_backtrace (original_fun, &original_args, UNEVALLED);
+ count = record_in_backtrace (original_fun, &original_args, UNEVALLED);
if (debug_on_next_call)
- do_debug_on_call (Qt);
+ do_debug_on_call (Qt, count);
/* At this point, only original_fun and original_args
have values that will be used below. */
@@ -2147,8 +2146,7 @@ eval_sub (Lisp_Object form)
gcpro3.nvars = argnum;
}
- set_backtrace_args (specpdl_ptr - 1, vals);
- set_backtrace_nargs (specpdl_ptr - 1, XINT (numargs));
+ set_backtrace_args (specpdl + count, vals, XINT (numargs));
val = (XSUBR (fun)->function.aMANY) (XINT (numargs), vals);
UNGCPRO;
@@ -2169,8 +2167,7 @@ eval_sub (Lisp_Object form)
UNGCPRO;
- set_backtrace_args (specpdl_ptr - 1, argvals);
- set_backtrace_nargs (specpdl_ptr - 1, XINT (numargs));
+ set_backtrace_args (specpdl + count, argvals, XINT (numargs));
switch (i)
{
@@ -2223,7 +2220,7 @@ eval_sub (Lisp_Object form)
}
}
else if (COMPILEDP (fun))
- val = apply_lambda (fun, original_args);
+ val = apply_lambda (fun, original_args, count);
else
{
if (NILP (fun))
@@ -2240,7 +2237,7 @@ eval_sub (Lisp_Object form)
}
if (EQ (funcar, Qmacro))
{
- ptrdiff_t count = SPECPDL_INDEX ();
+ ptrdiff_t count1 = SPECPDL_INDEX ();
Lisp_Object exp;
/* Bind lexical-binding during expansion of the macro, so the
macro can know reliably if the code it outputs will be
@@ -2248,19 +2245,19 @@ eval_sub (Lisp_Object form)
specbind (Qlexical_binding,
NILP (Vinternal_interpreter_environment) ? Qnil : Qt);
exp = apply1 (Fcdr (fun), original_args);
- unbind_to (count, Qnil);
+ unbind_to (count1, Qnil);
val = eval_sub (exp);
}
else if (EQ (funcar, Qlambda)
|| EQ (funcar, Qclosure))
- val = apply_lambda (fun, original_args);
+ val = apply_lambda (fun, original_args, count);
else
xsignal1 (Qinvalid_function, original_fun);
}
check_cons_list ();
lisp_eval_depth--;
- if (backtrace_debug_on_exit (specpdl_ptr - 1))
+ if (backtrace_debug_on_exit (specpdl + count))
val = call_debugger (list2 (Qexit, val));
specpdl_ptr--;
@@ -2657,7 +2654,7 @@ usage: (funcall FUNCTION &rest ARGUMENTS) */)
Lisp_Object lisp_numargs;
Lisp_Object val;
register Lisp_Object *internal_args;
- ptrdiff_t i;
+ ptrdiff_t i, count;
QUIT;
@@ -2670,13 +2667,13 @@ usage: (funcall FUNCTION &rest ARGUMENTS) */)
}
/* This also GCPROs them. */
- record_in_backtrace (args[0], &args[1], nargs - 1);
+ count = record_in_backtrace (args[0], &args[1], nargs - 1);
/* Call GC after setting up the backtrace, so the latter GCPROs the args. */
maybe_gc ();
if (debug_on_next_call)
- do_debug_on_call (Qlambda);
+ do_debug_on_call (Qlambda, count);
check_cons_list ();
@@ -2796,14 +2793,14 @@ usage: (funcall FUNCTION &rest ARGUMENTS) */)
}
check_cons_list ();
lisp_eval_depth--;
- if (backtrace_debug_on_exit (specpdl_ptr - 1))
+ if (backtrace_debug_on_exit (specpdl + count))
val = call_debugger (list2 (Qexit, val));
specpdl_ptr--;
return val;
}
static Lisp_Object
-apply_lambda (Lisp_Object fun, Lisp_Object args)
+apply_lambda (Lisp_Object fun, Lisp_Object args, ptrdiff_t count)
{
Lisp_Object args_left;
ptrdiff_t i;
@@ -2830,15 +2827,14 @@ apply_lambda (Lisp_Object fun, Lisp_Object args)
UNGCPRO;
- set_backtrace_args (specpdl_ptr - 1, arg_vector);
- set_backtrace_nargs (specpdl_ptr - 1, i);
+ set_backtrace_args (specpdl + count, arg_vector, i);
tem = funcall_lambda (fun, numargs, arg_vector);
/* Do the debug-on-exit now, while arg_vector still exists. */
- if (backtrace_debug_on_exit (specpdl_ptr - 1))
+ if (backtrace_debug_on_exit (specpdl + count))
{
/* Don't do it again when we return to eval. */
- set_backtrace_debug_on_exit (specpdl_ptr - 1, false);
+ set_backtrace_debug_on_exit (specpdl + count, false);
tem = call_debugger (list2 (Qexit, tem));
}
SAFE_FREE ();
diff --git a/src/frame.c b/src/frame.c
index 67993a627e..d56b11d962 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -1806,9 +1806,9 @@ The functions are run with one argument, the frame to be deleted. */)
DEFUN ("mouse-position", Fmouse_position, Smouse_position, 0, 0, 0,
doc: /* Return a list (FRAME X . Y) giving the current mouse frame and position.
-The position is given in character cells, where (0, 0) is the
-upper-left corner of the frame, X is the horizontal offset, and Y is
-the vertical offset.
+The position is given in canonical character cells, where (0, 0) is the
+upper-left corner of the frame, X is the horizontal offset, and Y is the
+vertical offset, measured in units of the frame's default character size.
If Emacs is running on a mouseless terminal or hasn't been programmed
to read the mouse position, it returns the selected frame for FRAME
and nil for X and Y.
@@ -1927,9 +1927,10 @@ Coordinates are relative to the frame, not a window,
so the coordinates of the top left character in the frame
may be nonzero due to left-hand scroll bars or the menu bar.
-The position is given in character cells, where (0, 0) is the
-upper-left corner of the frame, X is the horizontal offset, and Y is
-the vertical offset.
+The position is given in canonical character cells, where (0, 0) is
+the upper-left corner of the frame, X is the horizontal offset, and
+Y is the vertical offset, measured in units of the frame's default
+character size.
This function is a no-op for an X frame that is not visible.
If you have just created a frame, you must wait for it to become visible
diff --git a/src/image.c b/src/image.c
index 57f9b7735b..4b73a5fe80 100644
--- a/src/image.c
+++ b/src/image.c
@@ -8231,6 +8231,12 @@ imagemagick_load_image (struct frame *f, struct image *img,
return 0;
}
+ if (MagickGetImageDelay (image_wand) > 0)
+ img->lisp_data =
+ Fcons (Qdelay,
+ Fcons (make_float (MagickGetImageDelay (image_wand) / 100.0),
+ img->lisp_data));
+
if (MagickGetNumberImages (image_wand) > 1)
img->lisp_data =
Fcons (Qcount,
diff --git a/src/lisp.h b/src/lisp.h
index 2bc9fb1328..3795795c49 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -3976,8 +3976,7 @@ extern Lisp_Object safe_call2 (Lisp_Object, Lisp_Object, Lisp_Object);
extern void init_eval (void);
extern void syms_of_eval (void);
extern void unwind_body (Lisp_Object);
-extern void record_in_backtrace (Lisp_Object function,
- Lisp_Object *args, ptrdiff_t nargs);
+extern ptrdiff_t record_in_backtrace (Lisp_Object, Lisp_Object *, ptrdiff_t);
extern void mark_specpdl (void);
extern void get_backtrace (Lisp_Object array);
Lisp_Object backtrace_top_function (void);
diff --git a/src/macfont.m b/src/macfont.m
index 4bc58229d6..f1895d1b0a 100644
--- a/src/macfont.m
+++ b/src/macfont.m
@@ -2598,20 +2598,25 @@ static void
macfont_close (struct font *font)
{
struct macfont_info *macfont_info = (struct macfont_info *) font;
- int i;
- block_input ();
- CFRelease (macfont_info->macfont);
- CGFontRelease (macfont_info->cgfont);
- if (macfont_info->screen_font)
- CFRelease (macfont_info->screen_font);
- macfont_release_cache (macfont_info->cache);
- for (i = 0; i < macfont_info->metrics_nrows; i++)
- if (macfont_info->metrics[i])
- xfree (macfont_info->metrics[i]);
- if (macfont_info->metrics)
- xfree (macfont_info->metrics);
- unblock_input ();
+ if (macfont_info->cache)
+ {
+ int i;
+
+ block_input ();
+ CFRelease (macfont_info->macfont);
+ CGFontRelease (macfont_info->cgfont);
+ if (macfont_info->screen_font)
+ CFRelease (macfont_info->screen_font);
+ macfont_release_cache (macfont_info->cache);
+ for (i = 0; i < macfont_info->metrics_nrows; i++)
+ if (macfont_info->metrics[i])
+ xfree (macfont_info->metrics[i]);
+ if (macfont_info->metrics)
+ xfree (macfont_info->metrics);
+ macfont_info->cache = NULL;
+ unblock_input ();
+ }
}
static int
diff --git a/src/unexmacosx.c b/src/unexmacosx.c
index 940cbfacb1..3bd8f3b02f 100644
--- a/src/unexmacosx.c
+++ b/src/unexmacosx.c
@@ -1322,7 +1322,9 @@ dump_it (void)
}
if (curr_header_offset > text_seg_lowest_offset)
- unexec_error ("not enough room for load commands for new __DATA segments");
+ unexec_error ("not enough room for load commands for new __DATA segments"
+ " (increase headerpad_extra in configure.in to at least %lX)",
+ num_unexec_regions * sizeof (struct segment_command));
printf ("%ld unused bytes follow Mach-O header\n",
text_seg_lowest_offset - curr_header_offset);
diff --git a/src/w32term.c b/src/w32term.c
index 55c2d71834..443f5ece8f 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -2228,7 +2228,7 @@ x_draw_stretch_glyph_string (struct glyph_string *s)
{
/* In R2L rows, draw the cursor on the right edge of the
stretch glyph. */
- int right_x = window_box_right_offset (s->w, TEXT_AREA);
+ int right_x = window_box_right (s->w, TEXT_AREA);
if (x + background_width > right_x)
background_width -= x - right_x;
@@ -5472,6 +5472,12 @@ x_draw_hollow_cursor (struct window *w, struct glyph_row *row)
/* Compute frame-relative coordinates for phys cursor. */
get_phys_cursor_geometry (w, row, cursor_glyph, &left, &top, &h);
rect.left = left;
+ /* When on R2L character, show cursor at the right edge of the
+ glyph, unless the cursor box is as wide as the glyph or wider
+ (the latter happens when x-stretch-cursor is non-nil). */
+ if ((cursor_glyph->resolved_level & 1) != 0
+ && cursor_glyph->pixel_width > w->phys_cursor_width)
+ rect.left += cursor_glyph->pixel_width - w->phys_cursor_width;
rect.top = top;
rect.bottom = rect.top + h;
rect.right = rect.left + w->phys_cursor_width;
@@ -5553,7 +5559,7 @@ x_draw_bar_cursor (struct window *w, struct glyph_row *row,
WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y),
width, row->height);
}
- else
+ else /* HBAR_CURSOR */
{
int dummy_x, dummy_y, dummy_h;
@@ -5564,6 +5570,9 @@ x_draw_bar_cursor (struct window *w, struct glyph_row *row,
get_phys_cursor_geometry (w, row, cursor_glyph, &dummy_x,
&dummy_y, &dummy_h);
+ if ((cursor_glyph->resolved_level & 1) != 0
+ && cursor_glyph->pixel_width > w->phys_cursor_width)
+ x += cursor_glyph->pixel_width - w->phys_cursor_width;
w32_fill_area (f, hdc, cursor_color, x,
WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y +
row->height - width),
diff --git a/src/xdisp.c b/src/xdisp.c
index 08b7154aa8..18ba3319f3 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -2995,12 +2995,8 @@ init_iterator (struct it *it, struct window *w,
/* If we truncate lines, leave room for the truncation glyph(s) at
the right margin. Otherwise, leave room for the continuation
- glyph(s). Done only if the window has no fringes. Since we
- don't know at this point whether there will be any R2L lines in
- the window, we reserve space for truncation/continuation glyphs
- even if only one of the fringes is absent. */
- if (WINDOW_RIGHT_FRINGE_WIDTH (it->w) == 0
- || (it->bidi_p && WINDOW_LEFT_FRINGE_WIDTH (it->w) == 0))
+ glyph(s). Done only if the window has no right fringe. */
+ if (WINDOW_RIGHT_FRINGE_WIDTH (it->w) == 0)
{
if (it->line_wrap == TRUNCATE)
it->last_visible_x -= it->truncation_pixel_width;
@@ -3065,6 +3061,19 @@ init_iterator (struct it *it, struct window *w,
iterator. */
if (it->bidi_p)
{
+ /* Since we don't know at this point whether there will be
+ any R2L lines in the window, we reserve space for
+ truncation/continuation glyphs even if only the left
+ fringe is absent. */
+ if (base_face_id == DEFAULT_FACE_ID
+ && WINDOW_LEFT_FRINGE_WIDTH (it->w) == 0
+ && WINDOW_RIGHT_FRINGE_WIDTH (it->w) != 0)
+ {
+ if (it->line_wrap == TRUNCATE)
+ it->last_visible_x -= it->truncation_pixel_width;
+ else
+ it->last_visible_x -= it->continuation_pixel_width;
+ }
/* Note the paragraph direction that this buffer wants to
use. */
if (EQ (BVAR (current_buffer, bidi_paragraph_direction),
@@ -13564,6 +13573,12 @@ redisplay_internal (void)
if (mode_line_update_needed (w))
w->update_mode_line = 1;
+
+ /* If reconsider_clip_changes above decided that the narrowing
+ in the current buffer changed, make sure all other windows
+ showing that buffer will be redisplayed. */
+ if (current_buffer->clip_changed)
+ bset_update_mode_line (current_buffer);
}
/* Normally the message* functions will have already displayed and
@@ -19386,7 +19401,18 @@ extend_face_to_end_of_line (struct it *it)
for (row_width = 0, g = row_start; g < row_end; g++)
row_width += g->pixel_width;
- stretch_width = window_box_width (it->w, TEXT_AREA) - row_width;
+
+ /* FIXME: There are various minor display glitches in R2L
+ rows when only one of the fringes is missing. The
+ strange condition below produces the least bad effect. */
+ if ((WINDOW_LEFT_FRINGE_WIDTH (it->w) == 0)
+ == (WINDOW_RIGHT_FRINGE_WIDTH (it->w) == 0)
+ || WINDOW_RIGHT_FRINGE_WIDTH (it->w) != 0)
+ stretch_width = window_box_width (it->w, TEXT_AREA);
+ else
+ stretch_width = it->last_visible_x - it->first_visible_x;
+ stretch_width -= row_width;
+
if (stretch_width > 0)
{
stretch_ascent =
@@ -20527,9 +20553,17 @@ display_line (struct it *it)
/* When the last glyph of an R2L row only fits
partially on the line, we need to set row->x to a
negative offset, so that the leftmost glyph is
- the one that is partially visible. */
- if (row->reversed_p && new_x > it->last_visible_x)
- row->x = it->last_visible_x - new_x;
+ the one that is partially visible. But if we are
+ going to produce the truncation glyph, this will
+ be taken care of in produce_special_glyphs. */
+ if (row->reversed_p
+ && new_x > it->last_visible_x
+ && !(it->line_wrap == TRUNCATE
+ && WINDOW_LEFT_FRINGE_WIDTH (it->w) == 0))
+ {
+ eassert (FRAME_WINDOW_P (it->f));
+ row->x = it->last_visible_x - new_x;
+ }
}
else
{
@@ -20603,7 +20637,10 @@ display_line (struct it *it)
that they are cropped at the right edge of the
window, so an image glyph will always end exactly at
last_visible_x, even if there's no right fringe. */
- && (WINDOW_RIGHT_FRINGE_WIDTH (it->w) || it->what == IT_IMAGE))
+ && ((row->reversed_p
+ ? WINDOW_LEFT_FRINGE_WIDTH (it->w)
+ : WINDOW_RIGHT_FRINGE_WIDTH (it->w))
+ || it->what == IT_IMAGE))
? (it->current_x >= it->last_visible_x)
: (it->current_x > it->last_visible_x)))
{
@@ -25780,14 +25817,13 @@ produce_special_glyphs (struct it *it, enum display_element_type what)
temp_it.dp = NULL;
temp_it.what = IT_CHARACTER;
- temp_it.len = 1;
temp_it.c = temp_it.char_to_display = GLYPH_CHAR (glyph);
temp_it.face_id = GLYPH_FACE (glyph);
temp_it.len = CHAR_BYTES (temp_it.c);
PRODUCE_GLYPHS (&temp_it);
it->pixel_width = temp_it.pixel_width;
- it->nglyphs = temp_it.pixel_width;
+ it->nglyphs = temp_it.nglyphs;
}
#ifdef HAVE_WINDOW_SYSTEM
diff --git a/src/xterm.c b/src/xterm.c
index 1426546d3a..4b4349d262 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -2474,7 +2474,7 @@ x_draw_stretch_glyph_string (struct glyph_string *s)
{
/* In R2L rows, draw the cursor on the right edge of the
stretch glyph. */
- int right_x = window_box_right_offset (s->w, TEXT_AREA);
+ int right_x = window_box_right (s->w, TEXT_AREA);
if (x + background_width > right_x)
background_width -= x - right_x;
@@ -7977,6 +7977,15 @@ x_draw_hollow_cursor (struct window *w, struct glyph_row *row)
GCForeground, &xgcv);
gc = dpyinfo->scratch_cursor_gc;
+ /* When on R2L character, show cursor at the right edge of the
+ glyph, unless the cursor box is as wide as the glyph or wider
+ (the latter happens when x-stretch-cursor is non-nil). */
+ if ((cursor_glyph->resolved_level & 1) != 0
+ && cursor_glyph->pixel_width > w->phys_cursor_width)
+ {
+ x += cursor_glyph->pixel_width - w->phys_cursor_width;
+ wd -= 1;
+ }
/* Set clipping, draw the rectangle, and reset clipping again. */
x_clip_to_row (w, row, TEXT_AREA, gc);
XDrawRectangle (dpy, FRAME_X_WINDOW (f), gc, x, y, wd, h - 1);
@@ -8062,9 +8071,10 @@ x_draw_bar_cursor (struct window *w, struct glyph_row *row, int width, enum text
WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y),
width, row->height);
}
- else
+ else /* HBAR_CURSOR */
{
int dummy_x, dummy_y, dummy_h;
+ int x = WINDOW_TEXT_TO_FRAME_PIXEL_X (w, w->phys_cursor.x);
if (width < 0)
width = row->height;
@@ -8074,8 +8084,10 @@ x_draw_bar_cursor (struct window *w, struct glyph_row *row, int width, enum text
get_phys_cursor_geometry (w, row, cursor_glyph, &dummy_x,
&dummy_y, &dummy_h);
- XFillRectangle (dpy, window, gc,
- WINDOW_TEXT_TO_FRAME_PIXEL_X (w, w->phys_cursor.x),
+ if ((cursor_glyph->resolved_level & 1) != 0
+ && cursor_glyph->pixel_width > w->phys_cursor_width)
+ x += cursor_glyph->pixel_width - w->phys_cursor_width;
+ XFillRectangle (dpy, window, gc, x,
WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y +
row->height - width),
w->phys_cursor_width, width);