Mercurial > emacs
comparison src/editfns.c @ 21226:c8d0df2cbd3d
(Fgoto_char): If POSITION is a marker pointing a
different buffer, don't rely on the byte position of the marker.
| author | Richard M. Stallman <rms@gnu.org> |
|---|---|
| date | Fri, 20 Mar 1998 05:00:31 +0000 |
| parents | 47e189a470d2 |
| children | eba3d61855d0 |
comparison
equal
deleted
inserted
replaced
| 21225:47e189a470d2 | 21226:c8d0df2cbd3d |
|---|---|
| 201 register Lisp_Object position; | 201 register Lisp_Object position; |
| 202 { | 202 { |
| 203 int pos; | 203 int pos; |
| 204 unsigned char *p; | 204 unsigned char *p; |
| 205 | 205 |
| 206 if (MARKERP (position)) | 206 if (MARKERP (position) |
| 207 && current_buffer == XMARKER (position)->buffer) | |
| 207 { | 208 { |
| 208 pos = marker_position (position); | 209 pos = marker_position (position); |
| 209 if (pos < BEGV) | 210 if (pos < BEGV) |
| 210 SET_PT_BOTH (BEGV, BEGV_BYTE); | 211 SET_PT_BOTH (BEGV, BEGV_BYTE); |
| 211 else if (pos > ZV) | 212 else if (pos > ZV) |
