[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/systemd a2ec338 055/131: use loop
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/systemd a2ec338 055/131: use loop |
Date: |
Sun, 29 Aug 2021 11:35:14 -0400 (EDT) |
branch: elpa/systemd
commit a2ec338fa6908d05dba48baf69be9426cd97f7f7
Author: Mark Oteiza <mvoteiza@udel.edu>
Commit: Mark Oteiza <mvoteiza@udel.edu>
use loop
---
systemd-company.el | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/systemd-company.el b/systemd-company.el
index 52b66af..4ba9c6e 100644
--- a/systemd-company.el
+++ b/systemd-company.el
@@ -21,7 +21,7 @@
;;; Code:
-(require 'cl-lib)
+(eval-when-compile (require 'cl-lib))
(declare-function company-mode "company")
(declare-function company-begin-backend "company")
@@ -171,15 +171,15 @@
(prefix (and (eq major-mode 'systemd-mode)
(company-grab-symbol)))
(candidates
- (cl-remove-if-not
- (lambda (c) (string-prefix-p arg c))
- (if (systemd-company-network-p)
- (if (systemd-company-section-p)
- systemd-company-network-sections
- systemd-company-network-directives)
- (if (systemd-company-section-p)
- systemd-company-unit-sections
- systemd-company-unit-directives))))))
+ (cl-loop
+ for comp in (if (systemd-company-network-p)
+ (if (systemd-company-section-p)
+ systemd-company-network-sections
+ systemd-company-network-directives)
+ (if (systemd-company-section-p)
+ systemd-company-unit-sections
+ systemd-company-unit-directives))
+ if (string-prefix-p arg comp) collect comp))))
(defun systemd-company--setup-company (enable)
(when enable
(add-to-list (make-local-variable 'company-backends)
'systemd-company-backend))
- [nongnu] elpa/systemd 039bed6 004/131: add license, (continued)
- [nongnu] elpa/systemd 039bed6 004/131: add license, ELPA Syncer, 2021/08/29
- [nongnu] elpa/systemd f32ecf8 011/131: tag it, ELPA Syncer, 2021/08/29
- [nongnu] elpa/systemd 2a27186 023/131: format the list more programmatically, ELPA Syncer, 2021/08/29
- [nongnu] elpa/systemd 00a2520 028/131: add Package-Requires for emacs 24.3 (setq-local), ELPA Syncer, 2021/08/29
- [nongnu] elpa/systemd 8e6a8ce 038/131: remove backslash escapes from doc completions, ELPA Syncer, 2021/08/29
- [nongnu] elpa/systemd 968ae5e 039/131: bump for bug fix, ELPA Syncer, 2021/08/29
- [nongnu] elpa/systemd 57dcf5a 041/131: for some reason, this directive is missing, ELPA Syncer, 2021/08/29
- [nongnu] elpa/systemd 6071c23 046/131: version 1.3, ELPA Syncer, 2021/08/29
- [nongnu] elpa/systemd 175d45f 047/131: checkdoc, ELPA Syncer, 2021/08/29
- [nongnu] elpa/systemd 05dd16c 049/131: systemd 226, ELPA Syncer, 2021/08/29
- [nongnu] elpa/systemd a2ec338 055/131: use loop,
ELPA Syncer <=
- [nongnu] elpa/systemd 3eb9390 058/131: add lists of directives, ELPA Syncer, 2021/08/29
- [nongnu] elpa/systemd 070e15e 060/131: autoload temp files generated by sd's tempfn_random, ELPA Syncer, 2021/08/29
- [nongnu] elpa/systemd a86323e 059/131: v229, ELPA Syncer, 2021/08/29
- [nongnu] elpa/systemd 9fc0545 061/131: move systemd-font-lock-keywords, ELPA Syncer, 2021/08/29
- [nongnu] elpa/systemd f306614 066/131: dang spaces, ELPA Syncer, 2021/08/29
- [nongnu] elpa/systemd b004b37 068/131: autoload sorcery, ELPA Syncer, 2021/08/29
- [nongnu] elpa/systemd de5da7f 073/131: update Makefile, ELPA Syncer, 2021/08/29
- [nongnu] elpa/systemd 63d64ad 076/131: generate directive lists from files, ELPA Syncer, 2021/08/29
- [nongnu] elpa/systemd fe443ac 078/131: use font-lock-defaults to disable syntax highlighting, ELPA Syncer, 2021/08/29
- [nongnu] elpa/systemd 2e1f739 081/131: update readme, ELPA Syncer, 2021/08/29