[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/helm c5d0baa842 2/3: Reorder no code changes
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/helm c5d0baa842 2/3: Reorder no code changes |
Date: |
Sun, 20 Aug 2023 15:59:52 -0400 (EDT) |
branch: elpa/helm
commit c5d0baa842ae85d659678de94a5c679c37b451ce
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>
Reorder no code changes
---
helm-packages.el | 40 ++++++++++++++++++++--------------------
1 file changed, 20 insertions(+), 20 deletions(-)
diff --git a/helm-packages.el b/helm-packages.el
index ff8cf9c0df..6d82dcea83 100644
--- a/helm-packages.el
+++ b/helm-packages.el
@@ -22,6 +22,16 @@
(require 'helm)
(require 'package)
+(defclass helm-packages-class (helm-source-in-buffer)
+ ((coerce :initform #'helm-symbolify)
+ (find-file-target :initform #'helm-packages-quit-an-find-file)
+ (filtered-candidate-transformer
+ :initform
+ '(helm-packages-transformer
+ (lambda (candidates _source)
+ (sort candidates #'helm-generic-sort-fn)))))
+ "A class to define `helm-packages' sources.")
+
;;; Actions
;;
;;
@@ -140,7 +150,15 @@ Arg PACKAGES is a list of strings."
(when (y-or-n-p "Start a new Emacs with only package(s)? ")
(funcall isolate pkg-names)))))
-;;; Transformer
+(defun helm-packages-quit-an-find-file (source)
+ "`find-file-target' function for `helm-packages'."
+ (let* ((sel (helm-get-selection nil nil source))
+ (pkg (package-get-descriptor (intern sel))))
+ (if (and pkg (package-installed-p pkg))
+ (expand-file-name (package-desc-dir pkg))
+ package-user-dir)))
+
+;;; Transformers
;;
;;
(defun helm-packages-transformer (candidates _source)
@@ -191,25 +209,7 @@ Arg PACKAGES is a list of strings."
"Transformer function for `helm-packages' upgrade and delete sources."
(cl-loop for c in candidates
collect (cons (propertize c 'face 'font-lock-keyword-face) c)))
-
-(defun helm-packages-quit-an-find-file (source)
- "`find-file-target' function for `helm-packages'."
- (let* ((sel (helm-get-selection nil nil source))
- (pkg (package-get-descriptor (intern sel))))
- (if (and pkg (package-installed-p pkg))
- (expand-file-name (package-desc-dir pkg))
- package-user-dir)))
-
-(defclass helm-packages-class (helm-source-in-buffer)
- ((coerce :initform #'helm-symbolify)
- (find-file-target :initform #'helm-packages-quit-an-find-file)
- (filtered-candidate-transformer
- :initform
- '(helm-packages-transformer
- (lambda (candidates _source)
- (sort candidates #'helm-generic-sort-fn)))))
- "A class to define `helm-packages' sources.")
-
+
;;;###autoload
(defun helm-packages (&optional arg)
"Helm interface to manage packages.