branch: externals/denote
commit c4a6ec07e60241e3c4f8455317141a8ecac411f4
Author: Protesilaos Stavrou <[email protected]>
Commit: Protesilaos Stavrou <[email protected]>

    Add a comment about how I discovered wrong-number-of-arguments
    
    We would probably be okay with just ignoring 'error' but what I did
    there with wrong-number-of-arguments seems more precise.
---
 denote.el | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/denote.el b/denote.el
index 45d736e301..d6611c7071 100644
--- a/denote.el
+++ b/denote.el
@@ -5306,6 +5306,15 @@ own to return the appropriate description."
                 ;; `denote-link-description-format' accept a function
                 ;; with a single parameter.  Now we expect two
                 ;; arguments, but must be backward compatible.
+                ;;
+                ;; By the way, this is how I found `wrong-number-of-arguments':
+                ;;
+                ;;     (let ((errors nil))
+                ;;       (mapatoms
+                ;;        (lambda (symbol)
+                ;;          (when (get symbol 'error-conditions)
+                ;;            (push symbol errors))))
+                ;;       errors)
                 (description (ignore-error wrong-number-of-arguments
                                (funcall denote-link-description-format file 
file-type))))
       description))

Reply via email to