commit d40073f017ffb3dee2266f356c127ef587c40b71 (HEAD, refs/remotes/origin/master) Author: Glenn Morris Date: Wed Jan 11 15:01:28 2017 -0500 * autogen.sh: Add --no-check option. (Bug#25359) diff --git a/autogen.sh b/autogen.sh index 2021c771fc..8679db78fd 100755 --- a/autogen.sh +++ b/autogen.sh @@ -103,6 +103,7 @@ check_version () return 2 } +do_check=true do_autoconf=false test $# -eq 0 && do_autoconf=true do_git=false @@ -111,6 +112,9 @@ for arg; do case $arg in --help) exec echo "$0: usage: $0 [all|autoconf|git]";; + --no-check) + do_check=false + test $# -eq 1 && do_autoconf=true;; all) do_autoconf=true test -e .git && do_git=true;; @@ -128,66 +132,68 @@ done if $do_autoconf; then - echo 'Checking whether you have the necessary tools... + if $do_check; then + + echo 'Checking whether you have the necessary tools... (Read INSTALL.REPO for more details on building Emacs)' - missing= + missing= - for prog in $progs; do + for prog in $progs; do - sprog=`echo "$prog" | sed 's/-/_/g'` + sprog=`echo "$prog" | sed 's/-/_/g'` - eval min=\$${sprog}_min + eval min=\$${sprog}_min - echo "Checking for $prog (need at least version $min)..." + echo "Checking for $prog (need at least version $min)..." - check_version $prog $min + check_version $prog $min - retval=$? + retval=$? - case $retval in - 0) stat="ok" ;; - 1) stat="missing" ;; - 2) stat="too old" ;; - *) stat="unable to check" ;; - esac + case $retval in + 0) stat="ok" ;; + 1) stat="missing" ;; + 2) stat="too old" ;; + *) stat="unable to check" ;; + esac - echo $stat + echo $stat - if [ $retval -ne 0 ]; then - missing="$missing $prog" - eval ${sprog}_why=\""$stat"\" - fi + if [ $retval -ne 0 ]; then + missing="$missing $prog" + eval ${sprog}_why=\""$stat"\" + fi - done + done - if [ x"$missing" != x ]; then + if [ x"$missing" != x ]; then - echo ' + echo ' Building Emacs from the repository requires the following specialized programs:' - for prog in $progs; do - sprog=`echo "$prog" | sed 's/-/_/g'` + for prog in $progs; do + sprog=`echo "$prog" | sed 's/-/_/g'` - eval min=\$${sprog}_min + eval min=\$${sprog}_min - echo "$prog (minimum version $min)" - done + echo "$prog (minimum version $min)" + done - echo ' + echo ' Your system seems to be missing the following tool(s):' - for prog in $missing; do - sprog=`echo "$prog" | sed 's/-/_/g'` + for prog in $missing; do + sprog=`echo "$prog" | sed 's/-/_/g'` - eval why=\$${sprog}_why + eval why=\$${sprog}_why - echo "$prog ($why)" - done + echo "$prog ($why)" + done - echo ' + echo ' If you think you have the required tools, please add them to your PATH and re-run this script. @@ -208,18 +214,17 @@ make install. Add the installation directory to your PATH and re-run this script. If you know that the required versions are in your PATH, but this -script has made an error, then you can simply run - -autoreconf -fi -I m4 - -instead of this script. +script has made an error, then you can simply re-run this script with +the --no-check option. Please report any problems with this script to bug-gnu-emacs@gnu.org .' - exit 1 - fi + exit 1 + fi + + echo 'Your system has the required tools.' - echo 'Your system has the required tools.' + fi # do_check ## Create nt/gnulib.mk if it doesn't exist, as autoreconf will need it. if test ! -f nt/gnulib.mk; then commit 255f675d890b7fa2dc97a40dc03e82fa95b22e65 Author: Glenn Morris Date: Wed Jan 11 14:35:51 2017 -0500 Convert some network test failures to skipping These tests intermittently fail on hydra.nixos.org for unclear reasons related to starting the external process. This isn't an Emacs issue, and the failures cause noise on the emacs-buildstatus list. (Bug#24503) * test/lisp/net/network-stream-tests.el (echo-server-nowait) (connect-to-tls-ipv4-nowait): Skip rather than fail if the external process fails to start properly. diff --git a/test/lisp/net/network-stream-tests.el b/test/lisp/net/network-stream-tests.el index b237fea3dd..e7bb3e8ccf 100644 --- a/test/lisp/net/network-stream-tests.el +++ b/test/lisp/net/network-stream-tests.el @@ -152,7 +152,7 @@ (while (and (eq (process-status proc) 'connect) (< (setq times (1+ times)) 10)) (sit-for 0.1)) - (should-not (eq (process-status proc) 'connect)) + (skip-unless (not (eq (process-status proc) 'connect))) (with-current-buffer (process-buffer proc) (process-send-string proc "echo foo") (sleep-for 0.1) @@ -240,7 +240,7 @@ (while (and (eq (process-status proc) 'connect) (< (setq times (1+ times)) 10)) (sit-for 0.1)) - (should-not (eq (process-status proc) 'connect))) + (skip-unless (not (eq (process-status proc) 'connect)))) (if (process-live-p server) (delete-process server))) (setq status (gnutls-peer-status proc)) (should (consp status)) commit d569dd2198fb1116b696513d429d89c241021a83 Author: Alexander Kuleshov Date: Fri Dec 23 16:53:41 2016 +0600 Add DNS keywords and remove duplications * lisp/textmodes/dns-mode.el (dns-mode-types): Add two TLSA and NSEC" DNS related keywords and remove duplication of "NSAP". diff --git a/lisp/textmodes/dns-mode.el b/lisp/textmodes/dns-mode.el index 8d3e55a9bd..02cb2a2876 100644 --- a/lisp/textmodes/dns-mode.el +++ b/lisp/textmodes/dns-mode.el @@ -32,6 +32,9 @@ ;; RFC 1034, "DOMAIN NAMES - CONCEPTS AND FACILITIES", P. Mockapetris. ;; RFC 1035, "DOMAIN NAMES - IMPLEMENTATION AND SPECIFICATION", P. Mockapetris. +;; RFC 5155, "DNS Security (DNSSEC) Hashed Authenticated Denial of Existence" +;; RFC 6698, "The DNS-Based Authentication of Named Entities (DANE) +;; Transport Layer Security (TLS) Protocol: TLSA" ;;; Release history: @@ -50,13 +53,13 @@ (defconst dns-mode-types '("A" "NS" "MD" "MF" "CNAME" "SOA" "MB" "MG" "MR" "NULL" "WKS" "PTR" "HINFO" "MINFO" "MX" "TXT" - "RP" "AFSDB" "X25" "ISDN" "RT" "NSAP" "NSAP" + "RP" "AFSDB" "X25" "ISDN" "RT" "NSAP" "SIG" "KEY" "PX" "GPOS" "AAAA" "LOC" "NXT" "EID" "NIMLOC" "SRV" "ATMA" "NAPTR" "KX" "CERT" "A6" "DNAME" "SINK" "OPT" "APL" "DS" "SSHFP" "RRSIG" "NSEC" "DNSKEY" "UINFO" "UID" "GID" "UNSPEC" "TKEY" "TSIG" "IXFR" "AXFR" "MAILB" - "MAILA") + "MAILA" "TLSA" "NSEC3") "List of strings with known DNS types.") ;; Font lock. commit 6463b85aeb67326acda340fbaad3e481e62120c0 Author: Alan Mackenzie Date: Wed Jan 11 18:25:39 2017 +0000 Handle syntactic WS cache properties more accurately at buffer changes. This fixes bug #25362. * lisp/progmodes/cc-engine.el (c-sws-lit-type, c-sws-lit-limits) (c-invalidate-sws-region-before, c-invalidate-sws-region-after-del) (c-invalidate-sws-region-after-ins): New variables and functions. (c-invalidate-sws-region-after): Change from a defsubst to a defun. Also pass it the standard OLD-LEN argument. Call both c-invalidate-sws-region-after-{ins,del} to check for "dangerous" WS cache properties. * lisp/progmodes/cc-langs.el (c-block-comment-ender-regexp): New language variable. * lisp/progmodes/cc-mode.el (c-before-change): Call c-invalidate-sws-region-before. (c-after-change): Pass old-len to c-invalidate-sws-region-after. diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index a5d2588074..3077e0085d 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -1708,46 +1708,127 @@ comment at the start of cc-engine.el for more info." `((c-debug-remove-face beg end 'c-debug-is-sws-face) (c-debug-remove-face beg end 'c-debug-in-sws-face))))) -(defsubst c-invalidate-sws-region-after (beg end) - ;; Called from `after-change-functions'. Note that if - ;; `c-forward-sws' or `c-backward-sws' are used outside +;; The type of literal position `end' is in in a `before-change-functions' +;; function - one of `c', `c++', `pound', or nil (but NOT `string'). +(defvar c-sws-lit-type nil) +;; A cons (START . STOP) of the bounds of the comment or CPP construct +;; enclosing END, if any, else nil. +(defvar c-sws-lit-limits nil) + +(defun c-invalidate-sws-region-before (end) + ;; Called from c-before-change. END is the end of the change region, the + ;; standard parameter given to all before-change-functions. + ;; + ;; Note whether END is inside a comment or CPP construct, and if so note its + ;; bounds in `c-sws-lit-limits' and type in `c-sws-lit-type'. + (save-excursion + (goto-char end) + (let* ((limits (c-literal-limits)) + (lit-type (c-literal-type limits))) + (cond + ((memq lit-type '(c c++)) + (setq c-sws-lit-type lit-type + c-sws-lit-limits limits)) + ((c-beginning-of-macro) + (setq c-sws-lit-type 'pound + c-sws-lit-limits (cons (point) + (progn (c-end-of-macro) (point))))) + (t (setq c-sws-lit-type nil + c-sws-lit-limits nil)))))) + +(defun c-invalidate-sws-region-after-del (beg end old-len) + ;; Text has been deleted, OLD-LEN characters of it starting from position + ;; BEG. END is typically eq to BEG. Should there have been a comment or + ;; CPP construct open at END before the deletion, check whether this + ;; deletion deleted or "damaged" its opening delimiter. If so, return the + ;; current position of where the construct ended, otherwise return nil. + (when c-sws-lit-limits + (setcdr c-sws-lit-limits (- (cdr c-sws-lit-limits) old-len)) + (if (and (< beg (+ (car c-sws-lit-limits) 2)) ; A lazy assumption that + ; comment delimiters are 2 + ; chars long. + (or (get-text-property end 'c-in-sws) + (next-single-property-change end 'c-in-sws nil + (cdr c-sws-lit-limits)) + (get-text-property end 'c-is-sws) + (next-single-property-change end 'c-is-sws nil + (cdr c-sws-lit-limits)))) + (cdr c-sws-lit-limits)))) + +(defun c-invalidate-sws-region-after-ins (end) + ;; Text has been inserted, ending at buffer position END. Should there be a + ;; literal or CPP construct open at END, check whether there are `c-in-sws' + ;; or `c-is-sws' text properties inside this literal. If there are, return + ;; the buffer position of the end of the literal, else return nil. + (save-excursion + (let* ((limits (c-literal-limits)) + (lit-type (c-literal-type limits))) + (goto-char end) + (when (and (not (memq lit-type '(c c++))) + (c-beginning-of-macro)) + (setq lit-type 'pound + limits (cons (point) + (progn (c-end-of-macro) (point))))) + (when (memq lit-type '(c c++ pound)) + (let ((next-in (next-single-property-change (car limits) 'c-in-sws + nil (cdr limits))) + (next-is (next-single-property-change (car limits) 'c-is-sws + nil (cdr limits)))) + (and (or next-in next-is) + (cdr limits))))))) + +(defun c-invalidate-sws-region-after (beg end old-len) + ;; Called from `after-change-functions'. Remove any stale `c-in-sws' or + ;; `c-is-sws' text properties from the vicinity of the change. BEG, END, + ;; and OLD-LEN are the standard arguments given to after-change functions. + ;; + ;; Note that if `c-forward-sws' or `c-backward-sws' are used outside ;; `c-save-buffer-state' or similar then this will remove the cache ;; properties right after they're added. ;; ;; This function does hidden buffer changes. - - (save-excursion - ;; Adjust the end to remove the properties in any following simple - ;; ws up to and including the next line break, if there is any - ;; after the changed region. This is necessary e.g. when a rung - ;; marked empty line is converted to a line comment by inserting - ;; "//" before the line break. In that case the line break would - ;; keep the rung mark which could make a later `c-backward-sws' - ;; move into the line comment instead of over it. - (goto-char end) - (skip-chars-forward " \t\f\v") - (when (and (eolp) (not (eobp))) - (setq end (1+ (point))))) - - (when (and (= beg end) - (get-text-property beg 'c-in-sws) - (> beg (point-min)) - (get-text-property (1- beg) 'c-in-sws)) - ;; Ensure that an `c-in-sws' range gets broken. Note that it isn't - ;; safe to keep a range that was continuous before the change. E.g: - ;; - ;; #define foo - ;; \ - ;; bar - ;; - ;; There can be a "ladder" between "#" and "b". Now, if the newline - ;; after "foo" is removed then "bar" will become part of the cpp - ;; directive instead of a syntactically relevant token. In that - ;; case there's no longer syntactic ws from "#" to "b". - (setq beg (1- beg))) - - (c-debug-sws-msg "c-invalidate-sws-region-after [%s..%s]" beg end) - (c-remove-is-and-in-sws beg end)) + (let ((del-end + (and (> old-len 0) + (c-invalidate-sws-region-after-del beg end old-len))) + (ins-end + (and (> end beg) + (c-invalidate-sws-region-after-ins end)))) + (save-excursion + ;; Adjust the end to remove the properties in any following simple + ;; ws up to and including the next line break, if there is any + ;; after the changed region. This is necessary e.g. when a rung + ;; marked empty line is converted to a line comment by inserting + ;; "//" before the line break. In that case the line break would + ;; keep the rung mark which could make a later `c-backward-sws' + ;; move into the line comment instead of over it. + (goto-char end) + (skip-chars-forward " \t\f\v") + (when (and (eolp) (not (eobp))) + (setq end (1+ (point))))) + + (when (and (= beg end) + (get-text-property beg 'c-in-sws) + (> beg (point-min)) + (get-text-property (1- beg) 'c-in-sws)) + ;; Ensure that an `c-in-sws' range gets broken. Note that it isn't + ;; safe to keep a range that was continuous before the change. E.g: + ;; + ;; #define foo + ;; \ + ;; bar + ;; + ;; There can be a "ladder" between "#" and "b". Now, if the newline + ;; after "foo" is removed then "bar" will become part of the cpp + ;; directive instead of a syntactically relevant token. In that + ;; case there's no longer syntactic ws from "#" to "b". + (setq beg (1- beg))) + + (setq end (max (or del-end end) + (or ins-end end) + end)) + + (c-debug-sws-msg "c-invalidate-sws-region-after [%s..%s]" beg end) + (c-remove-is-and-in-sws beg end))) (defun c-forward-sws () ;; Used by `c-forward-syntactic-ws' to implement the unbounded search. diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el index 87aeaa4750..037404696d 100644 --- a/lisp/progmodes/cc-langs.el +++ b/lisp/progmodes/cc-langs.el @@ -1445,6 +1445,15 @@ properly." t "*/" awk nil) +(c-lang-defconst c-block-comment-ender-regexp + ;; Regexp which matches the end of a block comment (if such exists in the + ;; language) + t (if (c-lang-const c-block-comment-ender) + (regexp-quote (c-lang-const c-block-comment-ender)) + "\\<\\>")) +(c-lang-defvar c-block-comment-ender-regexp + (c-lang-const c-block-comment-ender-regexp)) + (c-lang-defconst c-comment-start-regexp ;; Regexp to match the start of any type of comment. t (let ((re (c-make-keywords-re nil diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index ac4ba05bb5..7e3c6ba15a 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el @@ -1209,6 +1209,7 @@ Note that the style variables are always made local to the buffer." ;; Are we coalescing two tokens together, e.g. "fo o" -> "foo"? (when (< beg end) (c-unfind-coalesced-tokens beg end)) + (c-invalidate-sws-region-before end) ;; Are we (potentially) disrupting the syntactic context which ;; makes a type a type? E.g. by inserting stuff after "foo" in ;; "foo bar;", or before "foo" in "typedef foo *bar;"? @@ -1338,7 +1339,7 @@ Note that the style variables are always made local to the buffer." (c-clear-char-property-with-value beg end 'syntax-table nil))) (c-trim-found-types beg end old-len) ; maybe we don't need all of these. - (c-invalidate-sws-region-after beg end) + (c-invalidate-sws-region-after beg end old-len) ;; (c-invalidate-state-cache beg) ; moved to `c-before-change'. (c-invalidate-find-decl-cache beg) commit 3a6df2d6043d32dd9a1864c87de8d99e9739a7e4 Author: Michael Albinus Date: Wed Jan 11 17:13:41 2017 +0100 Support stat 8.26 in Tramp * lisp/net/tramp-sh.el (tramp-get-remote-stat): Use QUOTING_STYLE environment variable of newer coreutils. (Bug#23422) diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 71a388767d..a3641c6c40 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -5357,12 +5357,14 @@ Nonexistent directories are removed from spec." ;; work on older AIX systems. Recent GNU stat versions (8.24?) ;; use shell quoted format for "%N", we check the boundaries "`" ;; and "'", therefore. See Bug#23422 in coreutils. + ;; Since GNU stat 8.26, environment variable QUOTING_STYLE is + ;; supported. (when result - (setq tmp - (tramp-send-command-and-read - vec (format "%s -c '(\"%%N\" %%s)' /" result) 'noerror)) + (setq result (concat "env QUOTING_STYLE=locale " result) + tmp (tramp-send-command-and-read + vec (format "%s -c '(\"%%N\" %%s)' /" result) 'noerror)) (unless (and (listp tmp) (stringp (car tmp)) - (string-match "^`/'$" (car tmp)) + (string-match "^\\(`/'\\|‘/’\\)$" (car tmp)) (integerp (cadr tmp))) (setq result nil))) result)))