bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#13625: Rép : bug#13625: 24.1; Enable 'package-menu-execute being non


From: Yves Baumes
Subject: bug#13625: Rép : bug#13625: 24.1; Enable 'package-menu-execute being non-interactive
Date: Tue, 05 Feb 2013 17:38:34 +0100

# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: address@hidden
# target_branch: bzr://bzr.savannah.gnu.org/emacs/trunk/
# testament_sha1: 509b0f8920808cc725a441fb32877e16e6ec513f
# timestamp: 2013-02-05 16:34:09 +0100
# source_branch: bzr://bzr.savannah.gnu.org/emacs/trunk
# base_revision_id: address@hidden
# 
# Begin patch
=== modified file 'lisp/ChangeLog'
--- lisp/ChangeLog      2013-02-05 12:16:35 +0000
+++ lisp/ChangeLog      2013-02-05 15:32:37 +0000
@@ -1,3 +1,8 @@
+2013-02-05  Yves Baumes  <address@hidden>
+
+       * lisp/emacs-lisp/package.el (package-menu-execute): Don't query
+       for the user input when called non-interactively (bug#13625).
+
 2013-02-05  Jan Djärv  <address@hidden>
 
        * cus-start.el (all): Add ns-use-native-fullscreen.

=== modified file 'lisp/emacs-lisp/package.el'
--- lisp/emacs-lisp/package.el  2013-01-01 09:11:05 +0000
+++ lisp/emacs-lisp/package.el  2013-02-05 15:32:37 +0000
@@ -1588,7 +1588,7 @@
               (length upgrades)
               (if (= (length upgrades) 1) "" "s")))))
 
-(defun package-menu-execute ()
+(defun package-menu-execute (&optional dont-query)
   "Perform marked Package Menu actions.
 Packages marked for installation are downloaded and installed;
 packages marked for deletion are removed."
@@ -1611,26 +1611,30 @@
                 (push (car id) install-list))))
        (forward-line)))
     (when install-list
-      (if (yes-or-no-p
-          (if (= (length install-list) 1)
-              (format "Install package `%s'? " (car install-list))
-            (format "Install these %d packages (%s)? "
-                    (length install-list)
-                    (mapconcat 'symbol-name install-list ", "))))
+      (if (or
+           dont-query
+           (yes-or-no-p
+            (if (= (length install-list) 1)
+                (format "Install package `%s'? " (car install-list))
+              (format "Install these %d packages (%s)? "
+                      (length install-list)
+                      (mapconcat 'symbol-name install-list ", ")))))
          (mapc 'package-install install-list)))
     ;; Delete packages, prompting if necessary.
     (when delete-list
-      (if (yes-or-no-p
-          (if (= (length delete-list) 1)
-              (format "Delete package `%s-%s'? "
-                      (caar delete-list)
-                      (cdr (car delete-list)))
-            (format "Delete these %d packages (%s)? "
-                    (length delete-list)
-                    (mapconcat (lambda (elt)
-                                 (concat (car elt) "-" (cdr elt)))
-                               delete-list
-                               ", "))))
+      (if (or
+           dont-query
+           (yes-or-no-p
+            (if (= (length delete-list) 1)
+                (format "Delete package `%s-%s'? "
+                        (caar delete-list)
+                        (cdr (car delete-list)))
+              (format "Delete these %d packages (%s)? "
+                      (length delete-list)
+                      (mapconcat (lambda (elt)
+                                   (concat (car elt) "-" (cdr elt)))
+                                 delete-list
+                                 ", ")))))
          (dolist (elt delete-list)
            (condition-case-unless-debug err
                (package-delete (car elt) (cdr elt))

# Begin bundle
IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWVO9iMYAAuR/gDD0FALb9//3
3iQAIP////BQBd5ytjWgaU0UAAQklNFMZR5TI2jTRPTKekxHqNAAABoBzAEYJiAYBME0ZDQwCYIx
MJTUaUYU2oPQhkAA0GCAGg0ABzAEYJiAYBME0ZDQwCYIxMJJATQIZMiaZMg01MmintU/SmATBPUb
KYFoE19fHbwg8lMd+/YHZy5U77T+j+S0OoYZvoxXqLHKhDnqQnnO4ezaIxfOghA5CPpX6BzLrmD8
xrBDMVlctQ76o4iyexYM11MkC+M4TRn0THKL1ogsivQIRdKUVq22ykLhaM9xLUQ5d91ncewQ6S6S
IzWKQImQyUiMmIFgfPSciX89uyMSmVF/huCIs4GAnIFOfsEtYesTNkTJZeGGSCWMxDmVJIQZDhKG
N8nTzcTJ5MyY3jCTF4564E7JPrKDGchSPxB9AOPMC9yZcNLFxOoZMNFk7pzPMJHqUW20z6Or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eqgmpkD
aHv/seEqJhwyZkmXDiUDV9cj23JHyKVDIeru5UPr1FxcckOSyctUDgLdDMKj1OLM83sMG4mq8At3
/L0qlmKXo6zUM3spGd6bgOHg5DI63pWd9FLwuqSze+B8ouBmYYX3o7BwzCJ7nL0DMuwZWmxDFQYV
wFRkGsTpi+Acz87zIBxePXgMDUCgWgT7oHUE0qpjDIfoibAr8gcFedmk24l6K1FmYMcDUw9Vp+e1
G5d0QTV6C4uVJgeoTuLV9jNFpcrTMvCwIloeoFSREwWYyONZjMmMGoymcuaiO+qI/8XckU4UJBTv
YjGA
Attached is a bzr bundle for the modifications.

Regards
Yves 

reply via email to

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