bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#28634: 25.2; minimap.el: next-single-property-change returns `nil`


From: Lars Ingebrigtsen
Subject: bug#28634: 25.2; minimap.el: next-single-property-change returns `nil`
Date: Mon, 15 Jul 2019 11:34:03 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Tom Regner <address@hidden> writes:

> Hello,
>
> in version 1.2 of minimap.el as distributed via elpa, in line 771 the
> call to `next-single-property-change`, intended to set `pos`, returns
> `nil` for a file I tried to activate it for, resulting in a
> 'minimap-enlarge-faces: Wrong type argument: integer-or-marker-p, nil '
> error. Checking for this outcome and leaving pos alone in that case, by
> changing the line 771 from
>
>                 (setq pos (next-single-property-change pos 'face))))
>
> to (wrapping the call with `or`)
>
>                 (setq pos (or (next-single-property-change pos 'face) pos))))
>
> fixes this for me.

Thanks; I've now applied the patch below to the package in ELPA.
Perhaps David will want to bump the version number (or not).

diff --git a/packages/minimap/minimap.el b/packages/minimap/minimap.el
index 231c04900..e6f2b727b 100644
--- a/packages/minimap/minimap.el
+++ b/packages/minimap/minimap.el
@@ -768,7 +768,7 @@ You can specify those properties with
        (with-current-buffer minimap-buffer-name
          (setq ov
                (make-overlay pos
-                             (setq pos (next-single-property-change pos 
'face))))
+                             (setq pos (or (next-single-property-change pos 
'face) pos))))
          (overlay-put ov 'face `(:family ,(face-font 'default)))
          (overlay-put ov 'priority 5)))
       (setq pos (next-single-property-change pos 'face)))))

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

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