* lisp/emacs-lisp/pcase.el (pcase--make-docstring): Fix bug#73766
authorStefan Monnier <monnier@iro.umontreal.ca>
Fri, 18 Oct 2024 18:55:40 +0000 (14:55 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Fri, 18 Oct 2024 18:55:40 +0000 (14:55 -0400)
Do not merge to `master`.

lisp/emacs-lisp/pcase.el

index 5a7f3995311e37a28aa41e18c83dc4573cae85d8..e9b2980d3edb35f85b3e1cb212f99577b21e2120 100644 (file)
@@ -181,7 +181,6 @@ Emacs Lisp manual for more information and examples."
   (let* ((main (documentation (symbol-function 'pcase) 'raw))
          (ud (help-split-fundoc main 'pcase)))
     (require 'help-fns)
-    (declare-function help-fns-short-filename "help-fns" (filename))
     (declare-function help-fns--signature "help-fns"
                       (function doc real-def real-function buffer))
     (with-temp-buffer
@@ -214,7 +213,9 @@ Emacs Lisp manual for more information and examples."
               (save-excursion
                 (forward-char -1)
                 (insert (format-message "  in `"))
-                (help-insert-xref-button (help-fns-short-filename filename)
+                ;; `file-name-nondirectory' is naive, but
+                ;; `help-fns-short-filename' is not fast enough yet (bug#73766).
+                (help-insert-xref-button (file-name-nondirectory filename)
                                          'help-function-def symbol filename
                                          'pcase-macro)
                 (insert (format-message "'."))))