[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/helm 6bf5f5a20f 6/6: Move helm-locate-lib-get-summary to h
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/helm 6bf5f5a20f 6/6: Move helm-locate-lib-get-summary to helm-lib |
Date: |
Wed, 13 Sep 2023 15:59:52 -0400 (EDT) |
branch: elpa/helm
commit 6bf5f5a20f062ce56312044e972bf49f457578dc
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>
Move helm-locate-lib-get-summary to helm-lib
---
helm-elisp.el | 22 +---------------------
helm-lib.el | 21 +++++++++++++++++++++
2 files changed, 22 insertions(+), 21 deletions(-)
diff --git a/helm-elisp.el b/helm-elisp.el
index fc0ec9ceef..a9c0377050 100644
--- a/helm-elisp.el
+++ b/helm-elisp.el
@@ -906,7 +906,7 @@ a string, i.e. the `symbol-name' of any existing symbol."
(defvar helm-locate-library-doc-cache (make-hash-table :test 'equal))
(defun helm-locate-library-scan-list ()
(cl-loop for dir in load-path
- with load-suffixes = (find-library-suffixes);'(".el")
+ with load-suffixes = (find-library-suffixes)
when (file-directory-p dir)
nconc (directory-files
dir nil (concat (regexp-opt (get-load-suffixes)) "\\'"))))
@@ -942,26 +942,6 @@ a string, i.e. the `symbol-name' of any existing symbol."
:action (helm-actions-from-type-file))
:buffer "*helm locate library*"))
-(defun helm-locate-lib-get-summary (file)
- (let* ((shell-file-name "sh")
- (shell-command-switch "-c")
- (cmd "%s %s | head -n1 | awk 'match($0,\"%s\",a) {print a[2]}'\
- | awk -F ' -*-' '{print $1}'")
- (regexp "^;;;(.*) --- (.*)$")
- (output (replace-regexp-in-string
- "\n" ""
- (with-temp-buffer
- (call-process-shell-command
- (format cmd
- (if (string-suffix-p ".gz" file)
- "gzip -c -q -d" "cat")
- (shell-quote-argument file)
- regexp)
- nil t nil)
- (buffer-string)))))
- (if (string= output "")
- "Not documented"
- output)))
;;; Modify variables from Helm
;;
diff --git a/helm-lib.el b/helm-lib.el
index 34e61b870c..b076faadff 100644
--- a/helm-lib.el
+++ b/helm-lib.el
@@ -1719,6 +1719,27 @@ Directories expansion is not supported."
(format ".*\\.\\(%s\\)$"
(replace-regexp-in-string
"," "\\\\|" (match-string 2 wc)))))
+
+(defun helm-locate-lib-get-summary (file)
+ (let* ((shell-file-name "sh")
+ (shell-command-switch "-c")
+ (cmd "%s %s | head -n1 | awk 'match($0,\"%s\",a) {print a[2]}'\
+ | awk -F ' -*-' '{print $1}'")
+ (regexp "^;;;(.*) --- (.*)$")
+ (output (replace-regexp-in-string
+ "\n" ""
+ (with-temp-buffer
+ (call-process-shell-command
+ (format cmd
+ (if (string-suffix-p ".gz" file)
+ "gzip -c -q -d" "cat")
+ (shell-quote-argument file)
+ regexp)
+ nil t nil)
+ (buffer-string)))))
+ (if (string= output "")
+ "Not documented"
+ output)))
;;; helm internals
;;
- [nongnu] elpa/helm updated (0313ad06ae -> 6bf5f5a20f), ELPA Syncer, 2023/09/13
- [nongnu] elpa/helm deb525f291 3/6: Improve helm-basename and fix docstring of helm-basedir, ELPA Syncer, 2023/09/13
- [nongnu] elpa/helm 6bf5f5a20f 6/6: Move helm-locate-lib-get-summary to helm-lib,
ELPA Syncer <=
- [nongnu] elpa/helm 0e78bd5b0c 5/6: Provide affix fn for library category, ELPA Syncer, 2023/09/13
- [nongnu] elpa/helm ba518fda86 2/6: Forward line on empty lines in mm-search, otherwise goto eol, ELPA Syncer, 2023/09/13
- [nongnu] elpa/helm 27ff321bf3 1/6: Fix internal variable name prefix in *multi-match, ELPA Syncer, 2023/09/13
- [nongnu] elpa/helm 332f55d601 4/6: Improve helm-locate-library, ELPA Syncer, 2023/09/13