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

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

bug#24073: 24.5; outline-on-heading-p sees any invisible text property a


From: Noam Postavsky
Subject: bug#24073: 24.5; outline-on-heading-p sees any invisible text property as outline invisible
Date: Thu, 28 Jul 2016 22:07:03 -0400

On Thu, Jul 28, 2016 at 12:25 AM, Paul Rankin <hello@paulwrankin.com> wrote:
> I've tried to create an advice patch for the benefit of users affected by the 
> bug to make outline-invisible-p return t for either 'outline or t, nil 
> otherwise...
>
>     (advice-add 'outline-invisible-p :filter-return
>                 (lambda (return) (eq return (or 'outline t)))
>                 '((name . "fountain-mode-patch")))
>
> However, it appears that other compiled functions in outline that call 
> outline-invisible-p do not respect this advice, e.g.
>
> 1. navigate to heading affected by above bug
> 2. M-: (outline-on-heading-p)
>     => nil
> 3. navigate to (defun outline-on-heading-p ...) in outline.el
> 4. C-M-x
> 5. repeat 1. and 2.
>     => t
>
> Do compiled functions not respect advice added to functions that they call?

I think it's because outline-invisible-p is a defsubst, so when
compiled, callers don't actually reference the symbol
`outline-invisible-p' at all.





reply via email to

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