branch: elpa/smartparens
commit e2df6f2858a5eeb6d0d0957042c194aeac0820d6
Merge: 684e7722bf 401ce3e3fb
Author: Matus Goljer <matus.gol...@gmail.com>
Commit: GitHub <nore...@github.com>

    Merge pull request #1144 from radenling/fix-empty-cheat-sheet
---
 smartparens.el | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/smartparens.el b/smartparens.el
index 20b7d1c307..f817b3fc53 100644
--- a/smartparens.el
+++ b/smartparens.el
@@ -57,6 +57,7 @@
 (require 'dash)
 (require 'thingatpt)
 (require 'help-mode) ;; for help-xref-following #85
+(require 'loadhist)
 
 (declare-function cua-replace-region "cua-base") ; FIXME: remove this when we 
drop support for old emacs
 (declare-function cua-delete-region "cua-base")
@@ -129,12 +130,8 @@ better orientation."
                                    sp-use-paredit-bindings
                                    sp-use-smartparens-bindings
                                    ))
-        (commands (cl-loop for i in (cdr
-                                     (assoc-string
-                                      (file-truename (locate-library 
"smartparens"))
-                                      (--map (cons (file-truename (car it)) 
(cdr it))
-                                             load-history)))
-                           if (and (consp i) (eq (car i) 'defun) (commandp 
(cdr i)))
+        (commands (cl-loop for i in (cdr (feature-symbols 'smartparens))
+                           if (and (eq (car-safe i) 'defun) (commandp (cdr i)))
                            collect (cdr i))))
     (with-current-buffer (get-buffer-create "*Smartparens cheat sheet*")
       (let ((standard-output (current-buffer))

Reply via email to