aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/international/mule-util.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/international/mule-util.el b/lisp/international/mule-util.el
index 92c540cea7d..2b4638bb2c8 100644
--- a/lisp/international/mule-util.el
+++ b/lisp/international/mule-util.el
@@ -335,9 +335,11 @@ QUALITY can be:
335 (while 335 (while
336 (progn 336 (progn
337 (setq pos (byte-to-position (+ pm byte (- eol-offset)))) 337 (setq pos (byte-to-position (+ pm byte (- eol-offset))))
338 (setq lines (1- (line-number-at-pos pos))) 338 ;; Adjust POS for DOS EOL format.
339 (not (= lines eol-offset))) 339 (when (= eol 1)
340 (setq eol-offset (+ eol-offset lines))) 340 (setq lines (1- (line-number-at-pos pos)))
341 (not (= lines eol-offset))))
342 (setq eol-offset lines))
341 pos)) 343 pos))
342 ;; FIXME: What if it's a 2-byte charset? Are there such beasts? 344 ;; FIXME: What if it's a 2-byte charset? Are there such beasts?
343 (`charset (+ pm byte)) 345 (`charset (+ pm byte))