summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2015-01-01 10:47:17 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2015-01-01 10:47:17 -0800
commit6ddd819467d1d9d0e78f13e5a15c1af9125ae67b (patch)
treebb6782a87dc52bed05166ac4ae458998c3418e70 /src
parent935fa6151b3e411c5308d62338744ff25f1a8ddb (diff)
parenta5f90a37622e9d0cb066da413846c1c3f6900b51 (diff)
downloademacs-6ddd819467d1d9d0e78f13e5a15c1af9125ae67b.tar.gz
Merge from origin/emacs-24
a5f90a3 * .gitattributes: New file. 5a9710f Make sure tool-bar changes are reflected on display. 93796ba * autogen.sh: Port better to non-GNU 'cp'. 9758516 Fix a typo in a comment in the previous commit. aa472a3 Fix the pixel coordinates returned by pos-visible-in-window-p. (Bug#19473) d261229 * automated/tramp-tests.el (tramp--test-smb-or-windows-nt-p): New defun. (tramp-test30-special-characters): Use it. (tramp--test-check-files): Filter nil file names out. 9278f05 Omit trailing white space 1c93fd3 Sync with Tramp 2.2.11. 96ebe18 Sync with Tramp 2.2.11. e792450 Sync with Tramp 2.2.11. 2d17e12 Fix ChangeLog entry. 6444482 Fix auto-revert-tail-mode for remote files b5c9c13 Spelling fixes c5504d1 src/w32proc.c (Fw32_get_codepage_charset): Doc fix. (Bug#19458) Conflicts: ChangeLog doc/misc/ChangeLog lisp/ChangeLog src/ChangeLog test/ChangeLog
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog9
-rw-r--r--src/ChangeLog.102
-rw-r--r--src/ChangeLog.124
-rw-r--r--src/w32proc.c7
-rw-r--r--src/xdisp.c23
5 files changed, 37 insertions, 8 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 85eb113db82..2cf21c9b4ad 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,12 @@
+2015-01-01 Eli Zaretskii <eliz@gnu.org>
+
+ * xdisp.c (pos_visible_p): Fix up the X coordinate for
+ right-to-left screen lines. (Bug#19473)
+
+2015-01-01 Eli Zaretskii <eliz@gnu.org>
+
+ * w32proc.c (Fw32_get_codepage_charset): Doc fix. (Bug#19458)
+
2014-12-31 Paul Eggert <eggert@cs.ucla.edu>
Simplify setfattr use by assuming GNU make
diff --git a/src/ChangeLog.10 b/src/ChangeLog.10
index b6646e797e3..58a67e863bf 100644
--- a/src/ChangeLog.10
+++ b/src/ChangeLog.10
@@ -2826,7 +2826,7 @@
2006-07-21 Eli Zaretskii <eliz@gnu.org>
* w32.c (convert_time): Use explicit long double constants to
- ensure long double arithmetics is used throughout.
+ ensure long double arithmetic is used throughout.
2006-07-20 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
diff --git a/src/ChangeLog.12 b/src/ChangeLog.12
index 80d7460c734..60f9ea294be 100644
--- a/src/ChangeLog.12
+++ b/src/ChangeLog.12
@@ -2327,7 +2327,7 @@
2012-12-08 Fabrice Popineau <fabrice.popineau@gmail.com>
- * w32fns.c (emacs_abort): Don't do arithmetics on void pointers.
+ * w32fns.c (emacs_abort): Don't do arithmetic on void pointers.
2012-12-08 Eli Zaretskii <eliz@gnu.org>
@@ -4716,7 +4716,7 @@
defining an XRectangle structure.
* w32proc.c (RVA_TO_PTR, w32_executable_type): Fix pointer
- arithmetics for compatibility with x64.
+ arithmetic for compatibility with x64.
* w32menu.c (add_menu_item): Use UINT_PTR instead of UINT, for
compatibility with x64.
diff --git a/src/w32proc.c b/src/w32proc.c
index c571726d70f..297db0e0185 100644
--- a/src/w32proc.c
+++ b/src/w32proc.c
@@ -3070,7 +3070,12 @@ If successful, the new CP is returned, otherwise nil. */)
DEFUN ("w32-get-codepage-charset", Fw32_get_codepage_charset,
Sw32_get_codepage_charset, 1, 1, 0,
doc: /* Return charset ID corresponding to codepage CP.
-Returns nil if the codepage is not valid. */)
+Returns nil if the codepage is not valid or its charset ID could
+not be determined.
+
+Note that this function is only guaranteed to work with ANSI
+codepages; most console codepages are not supported and will
+yield nil. */)
(Lisp_Object cp)
{
CHARSETINFO info;
diff --git a/src/xdisp.c b/src/xdisp.c
index e6bbd859fe7..b72577ea079 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -1406,6 +1406,7 @@ pos_visible_p (struct window *w, ptrdiff_t charpos, int *x, int *y,
struct text_pos top;
int visible_p = 0;
struct buffer *old_buffer = NULL;
+ bool r2l = false;
if (FRAME_INITIAL_P (XFRAME (WINDOW_FRAME (w))))
return visible_p;
@@ -1691,6 +1692,8 @@ pos_visible_p (struct window *w, ptrdiff_t charpos, int *x, int *y,
*rowh = max (0, (min (bottom_y, it.last_visible_y)
- max (top_y, window_top_y)));
*vpos = it.vpos;
+ if (it.bidi_it.paragraph_dir == R2L)
+ r2l = true;
}
}
else
@@ -1720,6 +1723,8 @@ pos_visible_p (struct window *w, ptrdiff_t charpos, int *x, int *y,
- max (it2.current_y,
WINDOW_HEADER_LINE_HEIGHT (w))));
*vpos = it2.vpos;
+ if (it2.bidi_it.paragraph_dir == R2L)
+ r2l = true;
}
else
bidi_unshelve_cache (it2data, 1);
@@ -1729,10 +1734,20 @@ pos_visible_p (struct window *w, ptrdiff_t charpos, int *x, int *y,
if (old_buffer)
set_buffer_internal_1 (old_buffer);
- if (visible_p && w->hscroll > 0)
- *x -=
- window_hscroll_limited (w, WINDOW_XFRAME (w))
- * WINDOW_FRAME_COLUMN_WIDTH (w);
+ if (visible_p)
+ {
+ if (w->hscroll > 0)
+ *x -=
+ window_hscroll_limited (w, WINDOW_XFRAME (w))
+ * WINDOW_FRAME_COLUMN_WIDTH (w);
+ /* For lines in an R2L paragraph, we need to mirror the X pixel
+ coordinate wrt the text area. For the reasons, see the
+ commentary in buffer_posn_from_coords and the explanation of
+ the geometry used by the move_it_* functions at the end of
+ the large commentary near the beginning of this file. */
+ if (r2l)
+ *x = window_box_width (w, TEXT_AREA) - *x - 1;
+ }
#if 0
/* Debugging code. */