[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r108883: * marker.c (set_marker_restr
From: |
Dmitry Antipov |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r108883: * marker.c (set_marker_restricted_both): Simplify by using |
Date: |
Thu, 05 Jul 2012 20:14:39 +0400 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 108883
committer: Dmitry Antipov <address@hidden>
branch nick: trunk
timestamp: Thu 2012-07-05 20:14:39 +0400
message:
* marker.c (set_marker_restricted_both): Simplify by using
clip_to_bounds.
modified:
src/ChangeLog
src/marker.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2012-07-05 16:00:20 +0000
+++ b/src/ChangeLog 2012-07-05 16:14:39 +0000
@@ -1,3 +1,8 @@
+2012-07-05 Dmitry Antipov <address@hidden>
+
+ * marker.c (set_marker_restricted_both): Simplify by using
+ clip_to_bounds.
+
2012-07-05 Paul Eggert <address@hidden>
* editfns.c (region_limit): Simplify by using clip_to_bounds.
=== modified file 'src/marker.c'
--- a/src/marker.c 2012-06-16 12:24:15 +0000
+++ b/src/marker.c 2012-07-05 16:14:39 +0000
@@ -667,14 +667,8 @@
}
}
- if (charpos < BUF_BEGV (b))
- charpos = BUF_BEGV (b);
- if (charpos > BUF_ZV (b))
- charpos = BUF_ZV (b);
- if (bytepos < BUF_BEGV_BYTE (b))
- bytepos = BUF_BEGV_BYTE (b);
- if (bytepos > BUF_ZV_BYTE (b))
- bytepos = BUF_ZV_BYTE (b);
+ charpos = clip_to_bounds (BUF_BEGV (b), charpos, BUF_ZV (b));
+ bytepos = clip_to_bounds (BUF_BEGV_BYTE (b), bytepos, BUF_ZV_BYTE (b));
/* In a single-byte buffer, the two positions must be equal. */
if (BUF_Z (b) == BUF_Z_BYTE (b)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r108883: * marker.c (set_marker_restricted_both): Simplify by using,
Dmitry Antipov <=