;;; linum.el --- display line numbers in the left margin
-;; Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
;; Author: Markus Triska <markus.triska@gmx.at>
;; Maintainer: FSF
(overlay-put ov 'before-string
(propertize " " 'display `((margin left-margin) ,str)))
(overlay-put ov 'linum-str str))))
- (forward-line)
+ ;; Text may contain those nasty intangible properties, but that
+ ;; shouldn't prevent us from counting those lines.
+ (let ((inhibit-point-motion-hooks t))
+ (forward-line))
(setq line (1+ line)))
(set-window-margins win width (cdr (window-margins win)))))