]> code.delx.au - gnu-emacs/blobdiff - lisp/linum.el
* lisp/erc/erc-backend.el (erc-process-sentinel): Check that buffer is alive
[gnu-emacs] / lisp / linum.el
index 81b48e99067a45c7a34b25ba8423a30ce7959e07..3d70c25477593655b057f44c80d083c93395d34f 100644 (file)
@@ -1,6 +1,6 @@
 ;;; 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
@@ -166,7 +166,10 @@ and you have to scroll or press \\[recenter-top-bottom] to update the numbers."
             (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)))))