emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/linum.el,v


From: Martin Rudalics
Subject: [Emacs-diffs] Changes to emacs/lisp/linum.el,v
Date: Sun, 31 Aug 2008 08:46:31 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Martin Rudalics <m061211>       08/08/31 08:46:30

Index: linum.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/linum.el,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- linum.el    26 Aug 2008 20:50:01 -0000      1.7
+++ linum.el    31 Aug 2008 08:46:30 -0000      1.8
@@ -30,7 +30,7 @@
 
 ;;; Code:
 
-(defconst linum-version "0.9wz")
+(defconst linum-version "0.9x")
 
 (defvar linum-overlays nil "Overlays used in this buffer.")
 (defvar linum-available nil "Overlays available for reuse.")
@@ -82,15 +82,14 @@
                                            'linum-update-current) nil t)
           (add-hook 'after-change-functions 'linum-after-change nil t))
         (add-hook 'window-scroll-functions 'linum-after-scroll nil t)
-        ;; mistake in Emacs: window-size-change-functions cannot be local
-        (add-hook 'window-size-change-functions 'linum-after-size)
+        (add-hook 'window-size-change-functions 'linum-after-size nil t)
         (add-hook 'change-major-mode-hook 'linum-delete-overlays nil t)
         (add-hook 'window-configuration-change-hook
                   'linum-after-config nil t)
         (linum-update-current))
     (remove-hook 'post-command-hook 'linum-update-current t)
     (remove-hook 'post-command-hook 'linum-schedule t)
-    (remove-hook 'window-size-change-functions 'linum-after-size)
+    (remove-hook 'window-size-change-functions 'linum-after-size t)
     (remove-hook 'window-scroll-functions 'linum-after-scroll t)
     (remove-hook 'after-change-functions 'linum-after-change t)
     (remove-hook 'window-configuration-change-hook 'linum-after-config t)
@@ -154,11 +153,9 @@
                             (throw 'visited t))))))
         (setq width (max width (length str)))
         (unless visited
-          (let (ov)
-            (if (null linum-available)
-                (setq ov (make-overlay (point) (point)))
-              (setq ov (pop linum-available))
-              (move-overlay ov (point) (point)))
+          (let ((ov (if (null linum-available)
+                        (make-overlay (point) (point))
+                      (move-overlay (pop linum-available) (point) (point)))))
             (push ov linum-overlays)
             (overlay-put ov 'before-string
                          (propertize " " 'display `((margin left-margin) 
,str)))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]