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

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

[nongnu] elpa/opam-switch-mode 61a681b016 1/4: refactor: Replace (redraw


From: ELPA Syncer
Subject: [nongnu] elpa/opam-switch-mode 61a681b016 1/4: refactor: Replace (redraw-display) with (force-mode-line-update t)
Date: Wed, 12 Jul 2023 10:00:27 -0400 (EDT)

branch: elpa/opam-switch-mode
commit 61a681b01600b02a514497d9a30586c31ac74bf0
Author: Erik Martin-Dorel <erik@martin-dorel.org>
Commit: Erik Martin-Dorel <erik@martin-dorel.org>

    refactor: Replace (redraw-display) with (force-mode-line-update t)
    
    Co-authored-by: Stefan Monnier <monnier@iro.umontreal.ca>
---
 NEWS.md             | 1 +
 opam-switch-mode.el | 7 +++----
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/NEWS.md b/NEWS.md
index 38810b599c..bbb0abbc54 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -14,6 +14,7 @@ The format is based on [Keep a 
Changelog](https://keepachangelog.com/en/1.0.0/).
 ### Changed
 
 - **README.md**: Use vanilla (not GitHub-flavored) Markdown syntax for snippets
+- Replace (redraw-display) with (force-mode-line-update t)
 
 ### Removed
 
diff --git a/opam-switch-mode.el b/opam-switch-mode.el
index 0ec42aa123..065873e2ee 100644
--- a/opam-switch-mode.el
+++ b/opam-switch-mode.el
@@ -321,6 +321,7 @@ not any other shells outside Emacs."
       (unless opam-switch--saved-env
         (opam-switch--save-current-env opam-env))
       (opam-switch--set-env opam-env prefix)))
+  (force-mode-line-update t)
   (run-hooks 'opam-switch-change-opam-switch-hook))
 
 (define-obsolete-function-alias 'opam-switch--set-switch
@@ -344,16 +345,14 @@ not any other shells outside Emacs."
    (mapcar
     (lambda (switch)
       `[,switch
-        (progn (opam-switch-set-switch ,switch)
-               (redraw-display))
+        (opam-switch-set-switch ,switch)
         :active t
         :help ,(concat "Select opam switch \"" switch "\"")])
     (opam-switch--get-switches))
    ;; now reset as last element
    '(
      ["reset"
-      (progn (opam-switch-set-switch "")
-             (redraw-display))
+      (opam-switch-set-switch "")
       :active opam-switch--saved-env
       :help "Reset to state when Emacs was started"])))
 



reply via email to

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