Discussion:
package.el strings
(too old to reply)
Richard Stallman
2017-05-24 14:16:00 UTC
Permalink
[[[ To any NSA and FBI agents reading my email: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
More often than not, we avoid ending messages and errors with a period.
It is a convention in Emacs that they don't end with a period.
If you come across any that do end in a period, please delete the
period.
--
Dr Richard Stallman
President, Free Software Foundation (gnu.org, fsf.org)
Internet Hall-of-Famer (internethalloffame.org)
Skype: No way! See stallman.org/skype.html.
Yuri Khan
2017-05-24 12:36:51 UTC
Permalink
More often than not, we avoid ending messages and errors with a period.
Think article headings and commit summaries, rather than sentences.
A commit summary *is* an article heading.
Jean-Christophe Helary
2017-05-24 12:07:27 UTC
Permalink
Thank you Dmitri.

I noticed that *after* I sent the patch. I'm going to work again on this and I'll send something better next week.

Sorry for that.

Jean-Christophe
- (error "Invalid version list `%s'" vlist))
+ (error "Invalid version list `%s'." vlist))
- (error "Invalid version list `%s'" vlist)))
+ (error "Invalid version list `%s'." vlist)))
More often than not, we avoid ending messages and errors with a period.
Think article headings and commit summaries, rather than sentences.
Jean-Christophe Helary
2017-05-24 11:00:49 UTC
Permalink
It looks like I introduced problems in this patch.

Please ignore.

Jean-Christophe
I've tried to straighten up the strings so that they stand on their own and don't rely of complex concatenations and variable substitutions. That makes for much less "smart" code but the resulting code/strings are more readable.
There is one big chunk left though (I put 2 TODOs there). It is the (describe-package-1) function. The function itself is about 200 lines long and there are 2 places I'm not sure yet what to do with, one uses prin1/princ and the other uses insert to generate strings. I'll check that part later.
Let me know what you think.
Jean-Christophe
<package.el_0524.diff>
Jean-Christophe Helary
2017-07-14 02:53:51 UTC
Permalink
It took me a lot longer than I thought but here is a diff for your comments. There is a dozen modifications in the file and a few comments.

There is 1 modification that is not related to (future) l10n, it was discussed in a different thread (using format to create https vs http). The rest is about native strings.

I have checked:

* DONE %
* DONE (... :tag "..."
* DONE (cl-defstruct
* DONE (completing-read
* DONE (completing-read-multiple
* DONE (concat -> problems
* DONE (defconst
* DONE (defcustom
* DONE (defface
* DONE (define-error
* DONE (defun
* DONE (defvar
* DONE (easy-menu-define
* DONE (error
* DONE (format
* DONE (format-message
* DONE (insert -> problems
* DONE (interactive -> prompt should be defined separately
* DONE (interactive-only
* DONE (mapconcat
* DONE (message
* DONE (prin1
* DONE (princ
* DONE (read-string
* DONE (setq
* DONE (user-error
* DONE (with-demoted-errors

There are string issues that I could not solve with some concat and some insert and as I wrote in May (describe-package-1) seems to use a lot of magic to create strings. I've fixed the prin1/princ block but there are other places where I'm not sure how to proceed.

Here is the "git diff master" file.

Jean-Christophe
Eli Zaretskii
2017-07-15 12:52:23 UTC
Permalink
Date: Fri, 14 Jul 2017 11:53:51 +0900
It took me a lot longer than I thought but here is a diff for your comments. There is a dozen modifications in the file and a few comments.
@@ -1490,7 +1492,7 @@ package-import-keyring
(setf (epg-context-home-directory context) package-gnupghome-dir))
(message "Importing %s..." (file-name-nondirectory file))
(epg-import-keys-from-file context file)
- (message "Importing %s...done" (file-name-nondirectory file))))
+ (message "Importing %s... Done" (file-name-nondirectory file))))
Can you tell why this is needed? The current code is how we say this
in a lot of places, and I don't think I see why it's bad for l10n.
- (format "%s packages will be installed:\n%s, proceed?"
+ (format "Number of packages to install: %s (%s), proceed? "
(length available)
- (mapconcat #'symbol-name available ", ")))
+ (mapconcat #'symbol-name available " ")))
You've removed the newline, so the prompt will wrap at some random
place. Is it really a good idea?

Also, I'd lose the "Number" part, and use %d for format, so it's clear
to translators that a number will follow.
- (message "%s packages are not available (the rest already installed), maybe you need to `M-x package-refresh-contents'"
+ (message "Number of packages that are not available: %s (the rest is already installed), maybe you need to `M-x package-refresh-contents'"
Likewise here: I'd say "Packages not available: %d". Same issue with
some other replacements you propose.
- (format "%s packages will be deleted:\n%s, proceed? "
+ (format "Number of packages to delete: %s (%s), proceed? "
(length removable)
- (mapconcat #'symbol-name removable ", ")))
+ (mapconcat #'symbol-name removable " ")))
And here.
- (prin1 name)
- (princ " is ")
- (princ (if (memq (aref status 0) '(?a ?e ?i ?o ?u)) "an " "a "))
- (princ status)
- (princ " package.\n\n")
+ (let ((sentence (format "The status of package %S is `%s'.\n\n" name status)))
+ (princ sentence))
Too wordy for my liking. How about this:

(princ (format "Package %S is %s.\n\n" name status))
- (concat
- (when delete "Delete ")
- (package-menu--list-to-prompt delete)
- (when (and delete install)
- (if upgrade "; " "; and "))
- (when install "Install ")
- (package-menu--list-to-prompt install)
- (when (and upgrade (or install delete)) "; and ")
- (when upgrade "Upgrade ")
- (package-menu--list-to-prompt upgrade)
- "? ")))
+ (format "Number of packages to delete: %s / install: %s / upgrade: %s, proceed? "
+ (package-menu--list-to-prompt delete)
+ (package-menu--list-to-prompt install)
+ (package-menu--list-to-prompt upgrade))))
This loses the feature of saying just what's needed, instead of
showing zero. Can we do better?
Jean-Christophe Helary
2017-07-15 14:48:57 UTC
Permalink
Post by Eli Zaretskii
- (message "Importing %s...done" (file-name-nondirectory file))))
+ (message "Importing %s... Done" (file-name-nondirectory file))))
Can you tell why this is needed? The current code is how we say this
in a lot of places, and I don't think I see why it's bad for l10n.
I thought there was a typo with the lack of space between the ... and the "done" and the lack upper case after a ... punctuation mark. If it is not, I'm fine with the original.
Post by Eli Zaretskii
- (format "%s packages will be installed:\n%s, proceed?"
+ (format "Number of packages to install: %s (%s), proceed? "
(length available)
- (mapconcat #'symbol-name available ", ")))
+ (mapconcat #'symbol-name available " ")))
You've removed the newline, so the prompt will wrap at some random
place. Is it really a good idea?
It was not a problem as far as I tested it since the package names are separated by a space (depending on the number of packages the original list itself can wrap in unexpected places).
Post by Eli Zaretskii
Also, I'd lose the "Number" part, and use %d for format, so it's clear
to translators that a number will follow.
"Packages to install: %d (%s), proceed? "
?
Post by Eli Zaretskii
- (prin1 name)
- (princ " is ")
- (princ (if (memq (aref status 0) '(?a ?e ?i ?o ?u)) "an " "a "))
- (princ status)
- (princ " package.\n\n")
+ (let ((sentence (format "The status of package %S is `%s'.\n\n" name status)))
+ (princ sentence))
(princ (format "Package %S is %s.\n\n" name status))
Nice :) It took me a while to figure out how to put all the parts together...
Post by Eli Zaretskii
- (concat
- (when delete "Delete ")
- (package-menu--list-to-prompt delete)
- (when (and delete install)
- (if upgrade "; " "; and "))
- (when install "Install ")
- (package-menu--list-to-prompt install)
- (when (and upgrade (or install delete)) "; and ")
- (when upgrade "Upgrade ")
- (package-menu--list-to-prompt upgrade)
- "? ")))
+ (format "Number of packages to delete: %s / install: %s / upgrade: %s, proceed? "
+ (package-menu--list-to-prompt delete)
+ (package-menu--list-to-prompt install)
+ (package-menu--list-to-prompt upgrade))))
This loses the feature of saying just what's needed, instead of
showing zero. Can we do better?
If you ask, there probably is a way... I'll try to find something better.

Jean-Christophe
Jean-Christophe Helary
2017-07-16 13:55:40 UTC
Permalink
Post by Eli Zaretskii
Also, I'd lose the "Number" part, and use %d for format, so it's clear
to translators that a number will follow.
"Packages to install: %d (%s), proceed? "
After replying, I realized that's actually the kind of string that I thought was weird when %d=1:

Packages to install: 1 (...), proceed ?

Here, "Packages" should be "Package", shouldn't it ?

Whereas

Number of packages to install: 1 (...), proceed ?
is always correct.


Jean-Christophe
Eli Zaretskii
2017-07-16 14:16:48 UTC
Permalink
Date: Sun, 16 Jul 2017 22:55:40 +0900
"Packages to install: %d (%s), proceed? "
Packages to install: 1 (...), proceed ?
I see nothing weird with it.
Here, "Packages" should be "Package", shouldn't it ?
No, not necessarily.
Whereas
Number of packages to install: 1 (...), proceed ?
is always correct.
To my eyes, both are correct.
Eli Zaretskii
2017-07-16 14:35:22 UTC
Permalink
Date: Sat, 15 Jul 2017 23:48:57 +0900
Post by Eli Zaretskii
- (message "Importing %s...done" (file-name-nondirectory file))))
+ (message "Importing %s... Done" (file-name-nondirectory file))))
Can you tell why this is needed? The current code is how we say this
in a lot of places, and I don't think I see why it's bad for l10n.
I thought there was a typo with the lack of space between the ... and the "done" and the lack upper case after a ... punctuation mark. If it is not, I'm fine with the original.
It's not a typo. We hove many dozens of these all over the place.

Thanks.
Jean-Christophe Helary
2017-07-16 14:37:30 UTC
Permalink
Ok, I'll amend following your 2 recent confirmations.

Jean-Christophe
Post by Eli Zaretskii
Date: Sat, 15 Jul 2017 23:48:57 +0900
Post by Eli Zaretskii
- (message "Importing %s...done" (file-name-nondirectory file))))
+ (message "Importing %s... Done" (file-name-nondirectory file))))
Can you tell why this is needed? The current code is how we say this
in a lot of places, and I don't think I see why it's bad for l10n.
I thought there was a typo with the lack of space between the ... and the "done" and the lack upper case after a ... punctuation mark. If it is not, I'm fine with the original.
It's not a typo. We hove many dozens of these all over the place.
Thanks.
Jean-Christophe Helary
2017-07-17 15:28:59 UTC
Permalink
Post by Jean-Christophe Helary
Post by Eli Zaretskii
- (concat
- (when delete "Delete ")
- (package-menu--list-to-prompt delete)
- (when (and delete install)
- (if upgrade "; " "; and "))
- (when install "Install ")
- (package-menu--list-to-prompt install)
- (when (and upgrade (or install delete)) "; and ")
- (when upgrade "Upgrade ")
- (package-menu--list-to-prompt upgrade)
- "? ")))
+ (format "Number of packages to delete: %s / install: %s / upgrade: %s, proceed? "
+ (package-menu--list-to-prompt delete)
+ (package-menu--list-to-prompt install)
+ (package-menu--list-to-prompt upgrade))))
This loses the feature of saying just what's needed, instead of
showing zero. Can we do better?
If you ask, there probably is a way... I'll try to find something better.
Ok, I found something for this part that I also adapted to 2 other parts that I had overly simplified. I also made a few modifications here and there compared to my original file.

Jean-Christophe
Eli Zaretskii
2017-07-22 09:23:21 UTC
Permalink
Date: Tue, 18 Jul 2017 00:28:59 +0900
Post by Jean-Christophe Helary
Post by Eli Zaretskii
- (concat
- (when delete "Delete ")
- (package-menu--list-to-prompt delete)
- (when (and delete install)
- (if upgrade "; " "; and "))
- (when install "Install ")
- (package-menu--list-to-prompt install)
- (when (and upgrade (or install delete)) "; and ")
- (when upgrade "Upgrade ")
- (package-menu--list-to-prompt upgrade)
- "? ")))
+ (format "Number of packages to delete: %s / install: %s / upgrade: %s, proceed? "
+ (package-menu--list-to-prompt delete)
+ (package-menu--list-to-prompt install)
+ (package-menu--list-to-prompt upgrade))))
This loses the feature of saying just what's needed, instead of
showing zero. Can we do better?
If you ask, there probably is a way... I'll try to find something better.
Ok, I found something for this part that I also adapted to 2 other parts that I had overly simplified. I also made a few modifications here and there compared to my original file.
Thanks, this looks OK. Could someone who uses/makes changes in
package.el please review these and, if OK, push to master?
Jean-Christophe Helary
2018-04-18 06:38:26 UTC
Permalink
Almost 9 months and nothing in master. Was there anything wrong with the code?

Jean-Christophe
Post by Eli Zaretskii
Date: Tue, 18 Jul 2017 00:28:59 +0900
Post by Jean-Christophe Helary
Post by Eli Zaretskii
- (concat
- (when delete "Delete ")
- (package-menu--list-to-prompt delete)
- (when (and delete install)
- (if upgrade "; " "; and "))
- (when install "Install ")
- (package-menu--list-to-prompt install)
- (when (and upgrade (or install delete)) "; and ")
- (when upgrade "Upgrade ")
- (package-menu--list-to-prompt upgrade)
- "? ")))
+ (format "Number of packages to delete: %s / install: %s / upgrade: %s, proceed? "
+ (package-menu--list-to-prompt delete)
+ (package-menu--list-to-prompt install)
+ (package-menu--list-to-prompt upgrade))))
This loses the feature of saying just what's needed, instead of
showing zero. Can we do better?
If you ask, there probably is a way... I'll try to find something better.
Ok, I found something for this part that I also adapted to 2 other parts that I had overly simplified. I also made a few modifications here and there compared to my original file.
Thanks, this looks OK. Could someone who uses/makes changes in
package.el please review these and, if OK, push to master?
Jean-Christophe Helary
-----------------------------------------------
http://mac4translators.blogspot.com @brandelune
Noam Postavsky
2018-04-26 01:10:05 UTC
Permalink
Post by Jean-Christophe Helary
Almost 9 months and nothing in master. Was there anything wrong with the code?
I think the problem is more a lack of people who "make changes in
package.el". Although there's enough that your patch no longer applies
cleanly.

error: patch failed: lisp/emacs-lisp/package.el:3262
error: lisp/emacs-lisp/package.el: patch does not apply

Some minor comments below.
Post by Jean-Christophe Helary
+;; The terminating comment could be a generic string that is not in English
(unless (search-forward (concat ";;; " file-name ".el ends here"))
(error "Package lacks a terminating comment"))
Should that be a FIXME or TODO?
Post by Jean-Christophe Helary
+ (message "Packages to hide: %s. Type `%s' to toggle or `%s' to customize"
^
Missing double space
Post by Jean-Christophe Helary
(defun package-menu--list-to-prompt (packages)
+;; The case where `package' is empty is handled in
+;; package-menu--prompt-transation-p below
^
transaction
Post by Jean-Christophe Helary
(defun package-menu--prompt-transaction-p (delete install upgrade)
+ (format "%s%s%s%s"
This kind of format call is that same as concat, right?
Post by Jean-Christophe Helary
+ (if (not delete) ""
+ (format "Packages to delete: %s. " (package-menu--list-to-prompt delete)))
+ (if (not install) ""
+ (format "Packages to install: %s. " (package-menu--list-to-prompt install)))
+ (if (not upgrade) ""
+ (format "Packages to upgrade: %s. " (package-menu--list-to-prompt upgrade)))
+ "Proceed? ")))
+
@@ -3262,25 +3252,23 @@ package-menu-execute
+ (format "[ %s%s%s]"
+ (if (not .delete) ""
+ (format "Delete %d " (length .delete)))
+ (if (not .install) ""
+ (format "Install %d " (length .install)))
+ (if (not .upgrade) ""
+ (format "Upgrade %d " (length .upgrade))))))
Perhaps this one too? (although in this case it would mean splitting up
the brackets)
Post by Jean-Christophe Helary
+ (message "Operation finished. Packages that are no longer needed: %d. Type `%s' to remove them"
^ ^
Double spacing Double spacing

This line is getting pretty long, perhaps it should be broken up?
Jean-Christophe Helary
2018-04-26 06:31:24 UTC
Permalink
Post by Noam Postavsky
Post by Jean-Christophe Helary
Almost 9 months and nothing in master. Was there anything wrong with the code?
I think the problem is more a lack of people who "make changes in
package.el". Although there's enough that your patch no longer applies
cleanly.
I thought so, but thank you for getting back to me.
Post by Noam Postavsky
error: patch failed: lisp/emacs-lisp/package.el:3262
error: lisp/emacs-lisp/package.el: patch does not apply
I'll fix the issues and will resubmit.
Post by Noam Postavsky
Some minor comments below.
Post by Jean-Christophe Helary
+;; The terminating comment could be a generic string that is not in English
(unless (search-forward (concat ";;; " file-name ".el ends here"))
(error "Package lacks a terminating comment"))
Should that be a FIXME or TODO?
If we consider l10n and the function of this string, there is no reason this string should be in English (or in any native language for that matter). I don't know what that makes it. I'd say FIXME.
Post by Noam Postavsky
Post by Jean-Christophe Helary
(defun package-menu--prompt-transaction-p (delete install upgrade)
+ (format "%s%s%s%s"
This kind of format call is that same as concat, right?
I'm not sure I understand the question. This format call produces messages that are semantically equivalent to the original concat calls but the concat calls were not localizable so I changed them to something that we'll eventually be able to properly extract and localize.

There are probably ways to use concat to produce localizable strings though.
Post by Noam Postavsky
Post by Jean-Christophe Helary
+ (message "Operation finished. Packages that are no longer needed: %d. Type `%s' to remove them"
^ ^
Double spacing Double spacing
This line is getting pretty long, perhaps it should be broken up?
I guess you mean the line of code?


Jean-Christophe Helary
-----------------------------------------------
http://mac4translators.blogspot.com @brandelune
Noam Postavsky
2018-04-26 11:28:56 UTC
Permalink
Post by Jean-Christophe Helary
I'm not sure I understand the question. This format call produces
messages that are semantically equivalent to the original concat calls
but the concat calls were not localizable so I changed them to something
that we'll eventually be able to properly extract and localize.
I meant just the outer (format "%s%s%s%s" ...) vs (concat ...). Is that
also needed to make strings localizable? If yes, I think adding a
comment would be helpful, because it looks a bit unnatural to me.
Post by Jean-Christophe Helary
Post by Noam Postavsky
Post by Jean-Christophe Helary
+ (message "Operation finished. Packages that are no longer needed: %d. Type `%s' to remove them"
This line is getting pretty long, perhaps it should be broken up?
I guess you mean the line of code?
Yes.
Jean-Christophe Helary
2018-04-26 13:32:59 UTC
Permalink
Post by Noam Postavsky
Post by Jean-Christophe Helary
I'm not sure I understand the question. This format call produces
messages that are semantically equivalent to the original concat calls
but the concat calls were not localizable so I changed them to something
that we'll eventually be able to properly extract and localize.
I meant just the outer (format "%s%s%s%s" ...) vs (concat ...). Is that
also needed to make strings localizable? If yes, I think adding a
comment would be helpful, because it looks a bit unnatural to me.
Oh, you mean (format "%s%s%s%s" ...) vs an eventual (concat "%s%s%s%s" ...) ?

I checked the lisp ref to find something that would make it a clear choice but did not find anything really conclusive.

What I did is I try to keep concat for simple strings. And anything that involved fixing complex native strings was either moved to format or something else.

There is nothing that makes concat of format etc more or less appropriate for l10n in my understanding. I guess I was influenced by the way the original authors abused concat to put native strings together...
Post by Noam Postavsky
Post by Jean-Christophe Helary
Post by Noam Postavsky
Post by Jean-Christophe Helary
+ (message "Operation finished. Packages that are no longer needed: %d. Type `%s' to remove them"
This line is getting pretty long, perhaps it should be broken up?
I guess you mean the line of code?
Yes.
It there a length limit in emacs code ?

Jean-Christophe Helary
-----------------------------------------------
http://mac4translators.blogspot.com @brandelune
Noam Postavsky
2018-04-28 22:11:30 UTC
Permalink
Post by Jean-Christophe Helary
Post by Noam Postavsky
I meant just the outer (format "%s%s%s%s" ...) vs (concat ...). Is that
also needed to make strings localizable? If yes, I think adding a
comment would be helpful, because it looks a bit unnatural to me.
Oh, you mean (format "%s%s%s%s" ...) vs an eventual (concat "%s%s%s%s" ...) ?
Sorry, I was trying to elide the the less relevant parts, but I see it's
making things less understandable. Let me just spell it out in full:

Instead of this:

(format "%s%s%s%s"
(if (not delete) ""
(format "Packages to delete: %s. " (package-menu--list-to-prompt delete)))
(if (not install) ""
(format "Packages to install: %s. " (package-menu--list-to-prompt install)))
(if (not upgrade) ""
(format "Packages to upgrade: %s. " (package-menu--list-to-prompt upgrade)))
"Proceed? ")

I think this would be a bit clearer:

(concat
(when delete
(format "Packages to delete: %s. " (package-menu--list-to-prompt delete)))
(when install
(format "Packages to install: %s. " (package-menu--list-to-prompt install)))
(when upgrade
(format "Packages to upgrade: %s. " (package-menu--list-to-prompt upgrade)))
"Proceed? ")
Post by Jean-Christophe Helary
It there a length limit in emacs code ?
Um, I thought there was a convention of generally trying to keep things
within 80 columns, but now I can't find anything saying that. I may
have just been thinking of other non-Emacs projects.
Jean-Christophe Helary
2018-04-28 23:46:06 UTC
Permalink
Post by Noam Postavsky
Post by Jean-Christophe Helary
Post by Noam Postavsky
I meant just the outer (format "%s%s%s%s" ...) vs (concat ...). Is that
also needed to make strings localizable? If yes, I think adding a
comment would be helpful, because it looks a bit unnatural to me.
Oh, you mean (format "%s%s%s%s" ...) vs an eventual (concat "%s%s%s%s" ...) ?
Sorry, I was trying to elide the the less relevant parts, but I see it's
Thank you. I see what you mean and that makes perfect sense. Give me a few days.
Post by Noam Postavsky
Post by Jean-Christophe Helary
It there a length limit in emacs code ?
Um, I thought there was a convention of generally trying to keep things
within 80 columns, but now I can't find anything saying that. I may
have just been thinking of other non-Emacs projects.
But I seem to remember something similar too. Wasn't it in the documentation strings ? Or the commit messages ?


Jean-Christophe Helary
-----------------------------------------------
http://mac4translators.blogspot.com @brandelune
Stefan Monnier
2018-04-29 19:43:49 UTC
Permalink
Post by Noam Postavsky
Um, I thought there was a convention of generally trying to keep things
within 80 columns,
Yes, please,


Stefan

Jean-Christophe Helary
2018-04-26 13:40:32 UTC
Permalink
Post by Noam Postavsky
Post by Jean-Christophe Helary
Almost 9 months and nothing in master. Was there anything wrong with the code?
I think the problem is more a lack of people who "make changes in
package.el". Although there's enough that your patch no longer applies
cleanly.
error: patch failed: lisp/emacs-lisp/package.el:3262
error: lisp/emacs-lisp/package.el: patch does not apply
Here is the updated patch with fixes for the comments you made.

Jean-Christophe
Post by Noam Postavsky
Some minor comments below.
Post by Jean-Christophe Helary
+;; The terminating comment could be a generic string that is not in English
(unless (search-forward (concat ";;; " file-name ".el ends here"))
(error "Package lacks a terminating comment"))
Should that be a FIXME or TODO?
Post by Jean-Christophe Helary
+ (message "Packages to hide: %s. Type `%s' to toggle or `%s' to customize"
^
Missing double space
Post by Jean-Christophe Helary
(defun package-menu--list-to-prompt (packages)
+;; The case where `package' is empty is handled in
+;; package-menu--prompt-transation-p below
^
transaction
Post by Jean-Christophe Helary
(defun package-menu--prompt-transaction-p (delete install upgrade)
+ (format "%s%s%s%s"
This kind of format call is that same as concat, right?
Post by Jean-Christophe Helary
+ (if (not delete) ""
+ (format "Packages to delete: %s. " (package-menu--list-to-prompt delete)))
+ (if (not install) ""
+ (format "Packages to install: %s. " (package-menu--list-to-prompt install)))
+ (if (not upgrade) ""
+ (format "Packages to upgrade: %s. " (package-menu--list-to-prompt upgrade)))
+ "Proceed? ")))
+
@@ -3262,25 +3252,23 @@ package-menu-execute
+ (format "[ %s%s%s]"
+ (if (not .delete) ""
+ (format "Delete %d " (length .delete)))
+ (if (not .install) ""
+ (format "Install %d " (length .install)))
+ (if (not .upgrade) ""
+ (format "Upgrade %d " (length .upgrade))))))
Perhaps this one too? (although in this case it would mean splitting up
the brackets)
Post by Jean-Christophe Helary
+ (message "Operation finished. Packages that are no longer needed: %d. Type `%s' to remove them"
^ ^
Double spacing Double spacing
This line is getting pretty long, perhaps it should be broken up?
Jean-Christophe Helary
-----------------------------------------------
http://mac4translators.blogspot.com @brandelune
Loading...