mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
profiles: emacs-subdirs: Avoid building circular lists.
This is a follow-up to e9b1329470
. If
the EMACSNATIVELOADPATH environment variable (by mistake) has duplicated
paths, Emacs fails to start up with a message along the lines of
List contains a loop:
("$HOME/.guix-profile/lib/emacs/native-site-lisp" […] . #2)
To prevent this issue in the face of possibly duplicated search path elements,
use non-destructive methods where possible.
* guix/profiles.scm (emacs-subdirs): Use 'append' rather than 'nconc'.
Change-Id: If646b806f24666b5247850d30d2819c7482c130b
Fixes: Emacs "List contains a loop" <https://issues.guix.gnu.org/75709>
Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
This commit is contained in:
parent
97fb1887ad
commit
f9b1e548c9
1 changed files with 6 additions and 2 deletions
|
@ -1230,8 +1230,12 @@ MANIFEST. Single-file bundles are required by programs such as Git and Lynx."
|
|||
(setq native-comp-eln-load-path
|
||||
(mapcan (lambda (dir)
|
||||
(if (equal dir needle)
|
||||
(nconc ',native-comp-dirs
|
||||
(list dir))
|
||||
;; Note: needle may be found
|
||||
;; multiple times, so don't use
|
||||
;; destructive procedures like
|
||||
;; nconc.
|
||||
(append ',native-comp-dirs
|
||||
(list dir))
|
||||
(list dir)))
|
||||
native-comp-eln-load-path))))
|
||||
port)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue