rt)))
(defun help-fns-short-filename (filename)
- (let* ((short (help-fns--filename filename))
- (prefixes (radix-tree-prefixes (help-fns--radix-tree load-path)
- (file-name-directory short))))
- (if (not prefixes)
- ;; The file is not inside the `load-path'.
- ;; FIXME: Here's the old code (too slow, bug#73766),
- ;; which used to try and shorten it with "../" as well.
- ;; (dolist (dir load-path)
- ;; (let ((rel (file-relative-name filename dir)))
- ;; (if (< (length rel) (length short))
- ;; (setq short rel)))
- ;; (let ((rel (file-relative-name abbrev dir)))
- ;; (if (< (length rel) (length short))
- ;; (setq short rel))))
- short
- (file-relative-name short (caar prefixes)))))
+ (cond
+ ((eq filename 'C-source) "C source code")
+ ((equal (file-name-extension filename) "el")
+ (let* ((short (help-fns--filename filename))
+ (prefixes (radix-tree-prefixes (help-fns--radix-tree load-path)
+ (file-name-directory short))))
+ (if prefixes (file-relative-name short (caar prefixes)) short)))
+ (t filename)))
(defun help-fns--analyze-function (function)
;; FIXME: Document/explain the differences between FUNCTION,