summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-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:
(while
(progn
(setq pos (byte-to-position (+ pm byte (- eol-offset))))
- (setq lines (1- (line-number-at-pos pos)))
- (not (= lines eol-offset)))
- (setq eol-offset (+ eol-offset lines)))
+ ;; Adjust POS for DOS EOL format.
+ (when (= eol 1)
+ (setq lines (1- (line-number-at-pos pos)))
+ (not (= lines eol-offset))))
+ (setq eol-offset lines))
pos))
;; FIXME: What if it's a 2-byte charset? Are there such beasts?
(`charset (+ pm byte))