|
6 | 6 | ;; URL: https://github.com/Wilfred/helpful |
7 | 7 | ;; Keywords: help, lisp |
8 | 8 | ;; Version: 0.22 |
9 | | -;; Package-Requires: ((emacs "25") (dash "2.18.0") (s "1.11.0") (f "0.20.0") (elisp-refs "1.2")) |
| 9 | +;; Package-Requires: ((emacs "25") (dash "2.18.0") (s "1.11.0") (elisp-refs "1.2")) |
10 | 10 |
|
11 | 11 | ;; This program is free software; you can redistribute it and/or modify |
12 | 12 | ;; it under the terms of the GNU General Public License as published by |
|
47 | 47 | (require 'help-fns) |
48 | 48 | (require 'dash) |
49 | 49 | (require 's) |
50 | | -(require 'f) |
51 | 50 | (require 'find-func) |
52 | 51 | (require 'nadvice) |
53 | 52 | (require 'info-look) |
@@ -349,8 +348,8 @@ source code to primitives." |
349 | 348 | (let ((emacs-src-dir (read-directory-name "Path to Emacs source code: "))) |
350 | 349 | ;; Let the user specify the source path with or without src/, |
351 | 350 | ;; which is a subdirectory in the Emacs tree. |
352 | | - (unless (equal (f-filename emacs-src-dir) "src") |
353 | | - (setq emacs-src-dir (f-join emacs-src-dir "src"))) |
| 351 | + (unless (equal (file-name-nondirectory (directory-file-name emacs-src-dir)) "src") |
| 352 | + (setq emacs-src-dir (expand-file-name "src/" emacs-src-dir))) |
354 | 353 | (setq find-function-C-source-directory emacs-src-dir)) |
355 | 354 | (helpful-update)) |
356 | 355 |
|
@@ -1333,10 +1332,11 @@ LIBRARY-NAME takes the form \"foo.el\" , \"foo.el\" or |
1333 | 1332 | \"src/foo.c\". |
1334 | 1333 |
|
1335 | 1334 | If .elc files exist without the corresponding .el, return nil." |
1336 | | - (when (member (f-ext library-name) '("c" "rs")) |
| 1335 | + (when (member (file-name-extension library-name) '("c" "rs")) |
1337 | 1336 | (setq library-name |
1338 | | - (f-expand library-name |
1339 | | - (f-parent find-function-C-source-directory)))) |
| 1337 | + (expand-file-name library-name |
| 1338 | + (file-name-directory |
| 1339 | + (directory-file-name find-function-C-source-directory))))) |
1340 | 1340 | (condition-case nil |
1341 | 1341 | (find-library-name library-name) |
1342 | 1342 | (error nil))) |
@@ -2389,7 +2389,7 @@ state of the current symbol." |
2389 | 2389 | ((and source-path primitive-p) |
2390 | 2390 | (format |
2391 | 2391 | "Finding references in a .%s file is not supported." |
2392 | | - (f-ext source-path))) |
| 2392 | + (file-name-extension source-path))) |
2393 | 2393 | (source-path |
2394 | 2394 | (format "%s is unused in %s." |
2395 | 2395 | helpful--sym |
@@ -2480,7 +2480,7 @@ state of the current symbol." |
2480 | 2480 | (propertize (format "%s Defined in " (if primitive-p "//" ";;")) |
2481 | 2481 | 'face 'font-lock-comment-face) |
2482 | 2482 | (helpful--navigate-button |
2483 | | - (f-abbrev source-path) |
| 2483 | + (abbreviate-file-name source-path) |
2484 | 2484 | source-path |
2485 | 2485 | pos) |
2486 | 2486 | "\n")) |
|
0 commit comments