Skip to content

Commit 80f4405

Browse files
committed
Remove the dependency on "f"
There were only 7 uses and 4 were aliases or thin wrappers around built-in functions.
1 parent 03756fa commit 80f4405

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

helpful.el

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
;; URL: https://github.com/Wilfred/helpful
77
;; Keywords: help, lisp
88
;; 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"))
1010

1111
;; This program is free software; you can redistribute it and/or modify
1212
;; it under the terms of the GNU General Public License as published by
@@ -47,7 +47,6 @@
4747
(require 'help-fns)
4848
(require 'dash)
4949
(require 's)
50-
(require 'f)
5150
(require 'find-func)
5251
(require 'nadvice)
5352
(require 'info-look)
@@ -349,8 +348,8 @@ source code to primitives."
349348
(let ((emacs-src-dir (read-directory-name "Path to Emacs source code: ")))
350349
;; Let the user specify the source path with or without src/,
351350
;; 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)))
354353
(setq find-function-C-source-directory emacs-src-dir))
355354
(helpful-update))
356355

@@ -1333,10 +1332,11 @@ LIBRARY-NAME takes the form \"foo.el\" , \"foo.el\" or
13331332
\"src/foo.c\".
13341333
13351334
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"))
13371336
(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)))))
13401340
(condition-case nil
13411341
(find-library-name library-name)
13421342
(error nil)))
@@ -2389,7 +2389,7 @@ state of the current symbol."
23892389
((and source-path primitive-p)
23902390
(format
23912391
"Finding references in a .%s file is not supported."
2392-
(f-ext source-path)))
2392+
(file-name-extension source-path)))
23932393
(source-path
23942394
(format "%s is unused in %s."
23952395
helpful--sym
@@ -2480,7 +2480,7 @@ state of the current symbol."
24802480
(propertize (format "%s Defined in " (if primitive-p "//" ";;"))
24812481
'face 'font-lock-comment-face)
24822482
(helpful--navigate-button
2483-
(f-abbrev source-path)
2483+
(abbreviate-file-name source-path)
24842484
source-path
24852485
pos)
24862486
"\n"))

0 commit comments

Comments
 (0)