branch: elpa/magit
commit 3b6298c8b75d535d783f039a50d70207123ba1d1
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>
No longer use cl-callf
This macro is interesting and tt some point I might start using it
regularly, but until that day has come, I encounter it so infrequently
that I always have macroexpand, to be sure what is going on.
I also suspect that I would find this more intuitive if FUNC were
evaluated, i.e., if the value passed for that argument were usually
function-quoted. That would make it much easier to know which argument
serves which purpose.
---
lisp/magit-process.el | 2 +-
lisp/magit-section.el | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lisp/magit-process.el b/lisp/magit-process.el
index bb26652a8d5..f24f439394f 100644
--- a/lisp/magit-process.el
+++ b/lisp/magit-process.el
@@ -808,7 +808,7 @@ Magit status buffer."
;; Find last ^M in string. If one was found, ignore
;; everything before it and delete the current line.
(when-let ((ret-pos (cl-position ?\r string :from-end t)))
- (cl-callf substring string (1+ ret-pos))
+ (setq string (substring string (1+ ret-pos)))
(delete-region (line-beginning-position) (point)))
(setq string (magit-process-remove-bogus-errors string))
(insert (propertize string 'magit-section
diff --git a/lisp/magit-section.el b/lisp/magit-section.el
index 61eb221aa32..e187e87daa2 100644
--- a/lisp/magit-section.el
+++ b/lisp/magit-section.el
@@ -1603,7 +1603,7 @@ is explicitly expanded."
(insert "\n")
;; Make the first header into the parent of the rest.
(when (cdr header-sections)
- (cl-callf nreverse header-sections)
+ (setq header-sections (nreverse header-sections))
(let* ((1st-header (pop header-sections))
(header-parent (oref 1st-header parent)))
(oset header-parent children (list 1st-header))