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

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

[nongnu] elpa/opam-switch-mode 95a3b4225a 15/31: fix: (opam-switch-mode


From: ELPA Syncer
Subject: [nongnu] elpa/opam-switch-mode 95a3b4225a 15/31: fix: (opam-switch-mode) × 3 bug (#4)
Date: Mon, 14 Nov 2022 09:00:00 -0500 (EST)

branch: elpa/opam-switch-mode
commit 95a3b4225af441b473146bb2e8b22b7a16bdceac
Author: Erik Martin-Dorel <erik@martin-dorel.org>
Commit: GitHub <noreply@github.com>

    fix: (opam-switch-mode) × 3 bug (#4)
    
    The precondition of `nconc` did not hold.
    
    § 
https://www.gnu.org/software/emacs/manual/html_node/elisp/Rearrangement.html
    
    ```
    Function: nconc &rest lists ¶
    
    […] all arguments (all but the last) should be mutable lists.
    
    A common pitfall is to use a constant list as a non-last argument to 
'nconc'.
    If you do this, the resulting behavior is undefined.
    ```
    
    Close #2
---
 opam-switch-mode.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/opam-switch-mode.el b/opam-switch-mode.el
index e3ccee9a40..dd27d41882 100644
--- a/opam-switch-mode.el
+++ b/opam-switch-mode.el
@@ -292,7 +292,7 @@ not any other shells outside emacs."
 
 (defun opsw--menu-items ()
   "Create list of opam switches as menu items for `easy-menu'."
-  (nconc
+  (append
    ;; first the current switch as info with a separator
    '(["current switch: " nil
       :active t



reply via email to

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