emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/systemd 59ce8ad 095/131: simpler while test


From: ELPA Syncer
Subject: [nongnu] elpa/systemd 59ce8ad 095/131: simpler while test
Date: Sun, 29 Aug 2021 11:35:22 -0400 (EDT)

branch: elpa/systemd
commit 59ce8ad415635c88889425ab2f02ba38e6a92a54
Author: Mark Oteiza <mvoteiza@udel.edu>
Commit: Mark Oteiza <mvoteiza@udel.edu>

    simpler while test
---
 systemd.el | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/systemd.el b/systemd.el
index b0e8039..af3e459 100644
--- a/systemd.el
+++ b/systemd.el
@@ -150,14 +150,12 @@
   "Return the value of the key whose value begins at position START.
 Lines ending in a backslash are concatenated with the next
 according to systemd.unit(5)."
-  (let ((break "\\\\\n")
-        end)
+  (let (end)
     (save-excursion
-      (while (progn (goto-char (1- (line-end-position)))
-                    (looking-at break))
+      (while (= (char-before (line-end-position)) ?\\)
         (forward-line))
       (setq end (line-end-position))
-      (replace-regexp-in-string break " " (buffer-substring start end)))))
+      (replace-regexp-in-string "\\\\\n" " " (buffer-substring start end)))))
 
 (defun systemd-doc-find ()
   "Find the value of the unit's “Documentation” keys.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]