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

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

bug#66032: [PATCH] Inline advice documentation into advised function's d


From: Stefan Monnier
Subject: bug#66032: [PATCH] Inline advice documentation into advised function's docstring, after all
Date: Mon, 18 Sep 2023 18:19:57 -0400
User-agent: Gnus/5.13 (Gnus v5.13)

> I have been trying to understand these quirks and previous bugs of
> functions `advice--make-single-doc' and `advice--make-docstring' better,
> also to probably provide some ERT tests, and would like to focus on one
> issue I came across.  Namely, it seems that your work-around:
>
>   ;; Hack attack!  For advices installed before calling
>   ;; Snarf-documentation, the integer offset into the DOC file will not
>   ;; be installed in the "core unadvised function" but in the advice
>   ;; object instead!  So here we try to undo the damage.
>   (when (integerp (aref flist 4))
>     (setq docfun flist))
>
> is no longer efficient.

Indeed, this is not needed any more (since we don't use pre-dump advice
any more) nor is it working (ever since nadvice.el was made to use OClosures).

>   (Snarf-documentation "DOC")
>
> I get a message
>
>   Docstring slot busy for rename-buffer

[ BTW, I consider this to a be long standing bug in
  `Snarf-documentation`.  But since it's very unusual to call this
  function after dumping, it's a low-priority issue.  ]


        Stefan






reply via email to

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