diff options
| author | Thien-Thi Nguyen | 2014-05-25 18:32:08 +0200 |
|---|---|---|
| committer | Thien-Thi Nguyen | 2014-05-25 18:32:08 +0200 |
| commit | e50a0b6e9df98aa4bfd904b82edd8c0d7b3a2da4 (patch) | |
| tree | dc962565851bab1e1d8125662721caf820379550 | |
| parent | cbe8e343e6ac5aaa0bf35b2014f49332bcc7add8 (diff) | |
| download | emacs-e50a0b6e9df98aa4bfd904b82edd8c0d7b3a2da4.tar.gz emacs-e50a0b6e9df98aa4bfd904b82edd8c0d7b3a2da4.zip | |
Fix bug: Properly quote args to generated -pkg.el `define-package'.
* lisp/emacs-lisp/package.el (package-generate-description-file):
Inline `package--alist-to-plist'; rewrite to selectively
quote alist values that are not self-quoting.
(package--alist-to-plist): Delete func.
| -rw-r--r-- | lisp/ChangeLog | 9 | ||||
| -rw-r--r-- | lisp/emacs-lisp/package.el | 21 |
2 files changed, 25 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index eb532742ada..2eeb15e42ad 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,12 @@ | |||
| 1 | 2014-05-25 Thien-Thi Nguyen <ttn@gnu.org> | ||
| 2 | |||
| 3 | Fix bug: Properly quote args to generated -pkg.el `define-package'. | ||
| 4 | |||
| 5 | * emacs-lisp/package.el (package-generate-description-file): | ||
| 6 | Inline `package--alist-to-plist'; rewrite to selectively | ||
| 7 | quote alist values that are not self-quoting. | ||
| 8 | (package--alist-to-plist): Delete func. | ||
| 9 | |||
| 1 | 2014-05-25 Andreas Schwab <schwab@linux-m68k.org> | 10 | 2014-05-25 Andreas Schwab <schwab@linux-m68k.org> |
| 2 | 11 | ||
| 3 | * term/xterm.el (xterm-function-map): Add mapping for shifted | 12 | * term/xterm.el (xterm-function-map): Add mapping for shifted |
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index c194e1352ac..c23be253b37 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el | |||
| @@ -702,14 +702,25 @@ untar into a directory named DIR; otherwise, signal an error." | |||
| 702 | (list (car elt) | 702 | (list (car elt) |
| 703 | (package-version-join (cadr elt)))) | 703 | (package-version-join (cadr elt)))) |
| 704 | requires)))) | 704 | requires)))) |
| 705 | (package--alist-to-plist | 705 | (let ((alist (package-desc-extras pkg-desc)) |
| 706 | (package-desc-extras pkg-desc)))) | 706 | flat) |
| 707 | (while alist | ||
| 708 | (let* ((pair (pop alist)) | ||
| 709 | (key (car pair)) | ||
| 710 | (val (cdr pair))) | ||
| 711 | ;; Don't bother ‘quote’ing ‘key’; it is always a keyword. | ||
| 712 | (push key flat) | ||
| 713 | (push (if (and (not (consp val)) | ||
| 714 | (or (keywordp val) | ||
| 715 | (not (symbolp val)) | ||
| 716 | (memq val '(nil t)))) | ||
| 717 | val | ||
| 718 | `',val) | ||
| 719 | flat))) | ||
| 720 | (nreverse flat)))) | ||
| 707 | "\n") | 721 | "\n") |
| 708 | nil pkg-file nil 'silent)))) | 722 | nil pkg-file nil 'silent)))) |
| 709 | 723 | ||
| 710 | (defun package--alist-to-plist (alist) | ||
| 711 | (apply #'nconc (mapcar (lambda (pair) (list (car pair) (cdr pair))) alist))) | ||
| 712 | |||
| 713 | (defun package-unpack (pkg-desc) | 724 | (defun package-unpack (pkg-desc) |
| 714 | "Install the contents of the current buffer as a package." | 725 | "Install the contents of the current buffer as a package." |
| 715 | (let* ((name (package-desc-name pkg-desc)) | 726 | (let* ((name (package-desc-name pkg-desc)) |