GNU bug report logs - #19324
25.0.50; add-function and nil

Previous Next

Package: emacs;

Reported by: Leo Liu <sdl.web <at> gmail.com>

Date: Tue, 9 Dec 2014 04:56:02 UTC

Severity: normal

Found in version 25.0.50

Done: Leo Liu <sdl.web <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Leo Liu <sdl.web <at> gmail.com>
Cc: 19324 <at> debbugs.gnu.org
Subject: bug#19324: 25.0.50; add-function and nil
Date: Wed, 10 Dec 2014 21:48:51 -0500
> Yes, I had expected this to work and obviously not so filed this bug.
> Otherwise it is not a bad workaround.

> Go to a buffer in text mode where the default
> eldoc-documentation-function is nil and eval

>   (add-function :around (local 'eldoc-documentation-function)
>                         (lambda (orig) (or (and orig (funcall orig)) (ignore))))

> Move around to get the error.

Ah, right, damn: the (local <foo>) causes the insertion of a "proxy
function" which runs the global value, but that doesn't check if
it's nil.
IOW it only works for :override.


        Stefan




This bug report was last modified 10 years and 168 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.