[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: |
Paul Rankin |
Subject: |
bug#24073: 24.5; outline-on-heading-p sees any invisible text property as outline invisible |
Date: |
Tue, 02 Aug 2016 13:27:17 +1000 |
npostavs@users.sourceforge.net on Mon, 01 Aug 2016 10:16 -0400:
> I don't think it's necessarily a misuse of defsubst, that just happens
> to be one of the limitations.
Jks ;)
> Well, as you saw, re`eval'uating outline-on-heading-p (so that it
> becomes uncompiled) seems to work, you could try doing that from lisp:
>
> (pcase (find-function-noselect 'outline-on-heading-p)
> (`(,buffer . ,position)
> (with-current-buffer buffer
> (goto-char position)
> (eval (read (current-buffer)))))
> (_ (error "Couldn't find `outline-on-heading-p'")))
Whoa this is terrifying...
Would something like the following work? Maybe with a
(condition-case ...) ?
(let ((source (find-function-noselect 'outline-on-heading-p)))
(with-current-buffer (car source)
(goto-char (cdr source))
(eval-defun nil)))
> Or advise :override outline-on-heading-p instead of outline-invisible-p.
But I want to act with a light touch...
> By the way, shouldn't that be
>
> (lambda (return) (or (eq return 'outline) return))
I think this will fail when outline-invisible-p returns foo in the
initial example. We want to only return t when outline-invisible-p
returns outline, not foo or otherwise.