Permalink
Browse files

Merge commit 'd284109ee9f56abacc52295f1a652155a7bfcb3c'

  • Loading branch information...
2 parents 62e07ff + d284109 commit 8babd80660a50183d81a9269e83c9e473c450ffb @purcell purcell committed Oct 15, 2016
Showing with 22 additions and 24 deletions.
  1. +22 −24 package-build/package-build.el
@@ -160,7 +160,7 @@ function for access to this function")
(defun package-build--string-rtrim (str)
"Remove trailing whitespace from `STR'."
- (replace-regexp-in-string "[ \t\n]*$" "" str))
+ (replace-regexp-in-string "[ \t\n\r]+$" "" str))
(defun package-build--valid-version (str &optional regexp)
@@ -182,7 +182,7 @@ or nil if the version cannot be parsed."
(match-string 3 s) " " (match-string 4 s))
s))))
(concat (format-time-string "%Y%m%d." time)
- (format "%d" (or (string-to-number (format-time-string "%H%M" time)) 0)))))
+ (format "%d" (string-to-number (format-time-string "%H%M" time))))))
(defun package-build--find-parse-time (regex &optional bound)
"Find REGEX in current buffer and format as a time-based version string, \
@@ -330,7 +330,7 @@ A number as third arg means request confirmation if NEWNAME already exists."
(defun package-build--grab-wiki-file (filename)
"Download FILENAME from emacswiki, returning its last-modified time."
(let* ((download-url
- (format "http://www.emacswiki.org/emacs/download/%s" filename))
+ (format "https://www.emacswiki.org/emacs/download/%s" filename))
headers)
(package-build--with-wiki-rate-limit
(setq headers (package-build--url-copy-file download-url filename t)))
@@ -705,17 +705,17 @@ Optionally PRETTY-PRINT the data."
(package-version-join (cadr elt))))
(aref pkg-info 1))
;; Append our extra information
- ,@(apply #'append (mapcar (lambda (entry)
- (let ((value (cdr entry)))
- (when (or (symbolp value) (listp value))
- ;; We must quote lists and symbols,
- ;; because Emacs 24.3 and earlier evaluate
- ;; the package information, which would
- ;; break for unquoted symbols or lists
- (setq value (list 'quote value)))
- (list (car entry) value)))
- (when (> (length pkg-info) 4)
- (aref pkg-info 4)))))
+ ,@(cl-mapcan (lambda (entry)
+ (let ((value (cdr entry)))
+ (when (or (symbolp value) (listp value))
+ ;; We must quote lists and symbols,
+ ;; because Emacs 24.3 and earlier evaluate
+ ;; the package information, which would
+ ;; break for unquoted symbols or lists
+ (setq value (list 'quote value)))
+ (list (car entry) value)))
+ (when (> (length pkg-info) 4)
+ (aref pkg-info 4))))
(current-buffer))
(princ ";; Local Variables:\n;; no-byte-compile: t\n;; End:\n" (current-buffer))))
@@ -1503,22 +1503,20 @@ If FILE-NAME is not specified, the default archive-contents file is used."
(type (elt info 3))
(props (when (> (length info) 4) (elt info 4))))
(list :ver ver
- :deps (apply 'append
- (mapcar (lambda (dep)
- (list (package-build--sym-to-keyword (car dep))
- (cadr dep)))
- deps))
+ :deps (cl-mapcan (lambda (dep)
+ (list (package-build--sym-to-keyword (car dep))
+ (cadr dep)))
+ deps)
:desc desc
:type type
:props props)))
(defun package-build--archive-alist-for-json ()
"Return the archive alist in a form suitable for JSON encoding."
- (apply 'append
- (mapcar (lambda (entry)
- (list (package-build--sym-to-keyword (car entry))
- (package-build--pkg-info-for-json (cdr entry))))
- (package-build-archive-alist))))
+ (cl-mapcan (lambda (entry)
+ (list (package-build--sym-to-keyword (car entry))
+ (package-build--pkg-info-for-json (cdr entry))))
+ (package-build-archive-alist)))
(defun package-build-archive-alist-as-json (file-name)
"Dump the build packages list to FILE-NAME as json."

0 comments on commit 8babd80

Please sign in to comment.