commit 760b091ac5c6e8e49ebbf7c080f500cfad2e1579 (HEAD, refs/remotes/origin/master) Author: Glenn Morris Date: Fri Dec 14 15:41:17 2018 -0500 * make-dist: Improve no-byte-compile check. diff --git a/make-dist b/make-dist index 7c7668b066..926665b8f0 100755 --- a/make-dist +++ b/make-dist @@ -266,7 +266,7 @@ if [ $check = yes ]; then bogosities= for file in $losers; do - grep -q "no-byte-compile: t" $file && continue + grep -q "^;.*no-byte-compile: t" $file && continue case $file in site-init.el | site-load.el | site-start.el | default.el) continue ;; esac commit af1bdfccd4867eed127a7d3d15b24baa9d5954bd Author: Glenn Morris Date: Fri Dec 14 15:40:15 2018 -0500 * make-dist: Improve tempfile handling. Prompted by /tmp/out existing and being owned by another user. diff --git a/make-dist b/make-dist index 111149d5b7..7c7668b066 100755 --- a/make-dist +++ b/make-dist @@ -222,18 +222,23 @@ if [ $check = yes ]; then error=no + temp_el=/tmp/make-dist.tmp.$$ + temp_elc=$temp_el.1 + temp_elelc=$temp_el.2 + temp_elcel=$temp_el.3 + ls -1 lisp/[a-zA-Z]*.el lisp/[a-z]*/[a-zA-Z0-9]*.el \ lisp/[a-z]*/[a-z]*/[a-zA-Z0-9]*.el \ - lisp/[a-z]*/[a-z]*/[a-z]*/[a-zA-Z0-9]*.el > /tmp/el + lisp/[a-z]*/[a-z]*/[a-z]*/[a-zA-Z0-9]*.el > $temp_el ls -1 lisp/[a-zA-Z]*.elc lisp/[a-z]*/[a-zA-Z0-9]*.elc \ lisp/[a-z]*/[a-z]*/[a-zA-Z0-9]*.elc \ - lisp/[a-z]*/[a-z]*/[a-z]*/[a-zA-Z0-9]*.elc > /tmp/elc + lisp/[a-z]*/[a-z]*/[a-z]*/[a-zA-Z0-9]*.elc > $temp_elc ## Check for .elc files with no corresponding .el file. - sed 's/\.el$/.elc/' /tmp/el > /tmp/elelc + sed 's/\.el$/.elc/' $temp_el > $temp_elelc - bogosities=`comm -13 /tmp/elelc /tmp/elc` + bogosities=`comm -13 $temp_elelc $temp_elc` if [ x"${bogosities}" != x"" ]; then error=yes echo "The following .elc files have no corresponding .el files:" @@ -241,15 +246,15 @@ if [ $check = yes ]; then fi ### Check for .el files with no corresponding .elc file. - sed 's/\.elc$/.el/' /tmp/elc > /tmp/elcel - losers=`comm -23 /tmp/el /tmp/elcel` + sed 's/\.elc$/.el/' $temp_elc > $temp_elcel + losers=`comm -23 $temp_el $temp_elcel` bogosities= while read elc; do el=`echo $elc | sed 's/c$//'` [ -r $el ] || continue [ $elc -nt $el ] || bogosities="$bogosities $elc" - done < /tmp/elc + done < $temp_elc if [ x"${bogosities}" != x"" ]; then error=yes @@ -257,7 +262,7 @@ if [ $check = yes ]; then echo "${bogosities}" fi - rm -f /tmp/el /tmp/elc /tmp/elcel /tmp/elelc + rm -f $temp_el* bogosities= for file in $losers; do @@ -278,7 +283,7 @@ if [ $check = yes ]; then ## This is only a crude check, eg it does not handle .info ## files with multiple .texi source files. - find doc -name '*.texi' > /tmp/el + find doc -name '*.texi' > $temp_el bogosities= while read texi; do @@ -287,9 +292,9 @@ if [ $check = yes ]; then info=info/$info [ -r $info ] || continue [ $info -nt $texi ] || bogosities="$bogosities $info" - done < /tmp/el + done < $temp_el - rm -f /tmp/el + rm -f $temp_el if [ x"${bogosities}" != x"" ]; then error=yes @@ -655,13 +660,13 @@ if [ "${newer}" ]; then ## We remove .elc files unconditionally, on the theory that anyone picking ## up an incremental distribution already has a running Emacs to byte-compile ## them with. - find ${tempparent} \( -name '*.elc' -o ! -newer ${newer} \) \ + find ${tempdir} \( -name '*.elc' -o ! -newer ${newer} \) \ -exec rm -f {} \; || exit fi ## Don't distribute backups, autosaves, etc. echo "Removing unwanted files" -find ${tempparent} \( -name '*~' -o -name '#*#' -o -name '.*ignore' -o -name '=*' -o -name 'TAGS' \) -exec rm -f {} \; || exit +find ${tempdir} \( -name '*~' -o -name '#*#' -o -name '.*ignore' -o -name '=*' -o -name 'TAGS' \) -exec rm -f {} \; || exit if [ "${make_tar}" = yes ]; then echo "Looking for $default_gzip" @@ -685,7 +690,7 @@ if [ "${make_tar}" = yes ]; then esac echo "Creating tar file" taropt='--numeric-owner --owner=0 --group=0 --mode=go+u,go-w' - tar --sort=name -cf /dev/null $tempparent/$emacsname/src/lisp.h 2>/tmp/out && + tar --sort=name -cf /dev/null $tempdir/src/lisp.h 2>/dev/null && taropt="$taropt --sort=name" [ "$verbose" = "yes" ] && taropt="$taropt --verbose" @@ -704,6 +709,7 @@ if [ "${make_tar}" = yes ]; then ) >$emacsname.tar$gzip_extension || exit fi +## Why are we deleting the staging directory if clean_up is no? if [ "${clean_up}" != yes ]; then (cd ${tempparent} && mv ${emacsname} ..) && rm -rf ${tempparent} commit fb8725ab5d148cf87ca0d4299e87ec1247171038 Author: Glenn Morris Date: Fri Dec 14 14:57:11 2018 -0500 * make-dist: Silence test of tar functionality. diff --git a/make-dist b/make-dist index bafcae35f0..111149d5b7 100755 --- a/make-dist +++ b/make-dist @@ -693,7 +693,7 @@ if [ "${make_tar}" = yes ]; then case $default_gzip in cat) tar $taropt -cf - $emacsname;; *) if tar $taropt -cf /dev/null --use-compress-program="$default_gzip" \ - $emacsname/src/lisp.h + $emacsname/src/lisp.h >& /dev/null then tar $taropt -cf - --use-compress-program="$default_gzip" $emacsname else commit f466b83226d3730eb903abb8595bb5ef0d5a5d29 Author: Basil L. Contovounesios Date: Fri Dec 14 14:46:47 2018 +0000 * lisp/emacs-lisp/map.el: Fix recent changes (map-empty-p): Add method for lists which avoids computing their entire length. (map-contains-key): Check for alist membership by comparing against DEFAULT argument returned by alist-get. (map-put!): Reconcile argument name with that used in docstring. diff --git a/lisp/emacs-lisp/map.el b/lisp/emacs-lisp/map.el index 35759db627..78cedd3ab1 100644 --- a/lisp/emacs-lisp/map.el +++ b/lisp/emacs-lisp/map.el @@ -243,6 +243,9 @@ The default implementation delegates to `map-filter'." The default implementation delegates to `map-length'." (zerop (map-length map))) +(cl-defmethod map-empty-p ((map list)) + (null map)) + (cl-defgeneric map-contains-key (map key &optional testfn) ;; FIXME: The test function to use generally depends on the map object, ;; so specifying `testfn' here is problematic: e.g. for hash-tables @@ -259,7 +262,8 @@ The default implementation delegates to `map-do'." nil)) (cl-defmethod map-contains-key ((map list) key &optional testfn) - (alist-get key map nil nil (or testfn #'equal))) + (let ((v '(nil))) + (not (eq v (alist-get key map v nil (or testfn #'equal)))))) (cl-defmethod map-contains-key ((map array) key &optional _testfn) (and (integerp key) @@ -332,16 +336,16 @@ MAP can be a list, hash-table or array." ;; FIXME: I wish there was a way to avoid this η-redex! (cl-defmethod map-into (map (_type (eql list))) (map-pairs map)) -(cl-defgeneric map-put! (map key v) +(cl-defgeneric map-put! (map key value) "Associate KEY with VALUE in MAP and return VALUE. If KEY is already present in MAP, replace the associated value with VALUE." (map--dispatch map :list (let ((p (assoc key map))) - (if p (setcdr p v) + (if p (setcdr p value) (error "No place to change the mapping for %S" key))) - :hash-table (puthash key v map) - :array (aset map key v))) + :hash-table (puthash key value map) + :array (aset map key value))) ;; There shouldn't be old source code referring to `map--put', yet we do ;; need to keep it for backward compatibility with .elc files where the