emacs-devel
[Top][All Lists]
Advanced

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

Re: bug in forward-visible-line: Patch


From: David Kastrup
Subject: Re: bug in forward-visible-line: Patch
Date: 23 May 2003 00:27:06 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

Luc Teirlinck <address@hidden> writes:

> What about the following function?  I should still double-check it
> more carefully, but on first testing in a reasonably complex
> situation, it seems to work OK.

If (listp prop) evaluates to t, nil is always returned.

> ===File ~/invp.el===========================================

invp.el for a function visiblep?

> (defun visiblep (&optional pos)
>   "Return t if character at POS is currently visible.
> POS defaults to point."
>   (unless pos (setq pos (point)))
>   (let ((prop (get-text-property pos 'invisible)))
>     (cond
>      ((null prop))
>      ((eq buffer-invisibility-spec t) nil)
>      ((memq prop buffer-invisibility-spec) nil)
>      ((assq prop buffer-invisibility-spec) nil)
>      ((listp prop)
>       (catch 'found
>       (dolist (var prop)
>         (if (or (memq var buffer-invisibility-spec)
>                 (assq var buffer-invisibility-spec))
>             (throw 'found nil)))))
>      (t))))

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




reply via email to

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