commit 5e86db05fc836e708e1e0f791270c961160ca5d3 (HEAD, refs/remotes/origin/master) Author: Juanma Barranquero Date: Mon Sep 23 09:15:01 2019 +0200 Fix arg name of `text-property-search-{forward|backward}' (bug#37488) * lisp/emacs-lisp/text-property-search.el (text-property-search-forward, text-property-search-backward): Rename arg NOT-IMMEDIATE to NOT-CURRENT. Also fix docstring. diff --git a/lisp/emacs-lisp/text-property-search.el b/lisp/emacs-lisp/text-property-search.el index 41ca07057e..5329c967e3 100644 --- a/lisp/emacs-lisp/text-property-search.el +++ b/lisp/emacs-lisp/text-property-search.el @@ -30,7 +30,7 @@ beginning end value) (defun text-property-search-forward (property &optional value predicate - not-immediate) + not-current) "Search for the next region that has text property PROPERTY set to VALUE. If not found, the return value is nil. If found, point will be placed at the end of the region and an object describing the @@ -45,7 +45,7 @@ means the same as `equal'. `nil' means almost the same as \"not equal\", but will also end the match if the value of PROPERTY changes. See the manual for extensive examples. -If `not-immediate', if the match is under point, it will not be +If NOT-CURRENT, if the match is under point, it will not be returned, but instead the next instance is returned, if any. The return value (if a match is made) is a `prop-match' @@ -66,7 +66,7 @@ at the start of the region)." ;; end. ((and (text-property--match-p value (get-text-property (point) property) predicate) - (not not-immediate)) + (not not-current)) (text-property--find-end-forward (point) property value predicate)) (t (let ((origin (point)) @@ -121,7 +121,7 @@ at the start of the region)." (defun text-property-search-backward (property &optional value predicate - not-immediate) + not-current) "Search for the previous region that has text property PROPERTY set to VALUE. See `text-property-search-forward' for further documentation." (interactive @@ -138,7 +138,7 @@ See `text-property-search-forward' for further documentation." ((and (text-property--match-p value (get-text-property (1- (point)) property) predicate) - (not not-immediate)) + (not not-current)) (text-property--find-end-backward (1- (point)) property value predicate)) (t (let ((origin (point)) commit 946a56a10fed769646a8b7c4ebc53f53c84be896 Author: Paul Eggert Date: Sun Sep 22 23:53:39 2019 -0700 Update some URLs This mostly changes http: to https: in URLs. It also updates some URLs that have moved, removes some URLs that no longer work, recommends against using procmail (procmail.org no longer works), and removes some mentions of the no-longer-existing Gmane, LPF and VTW. It doesn't update all URLs, just the ones I had time for. * GNUmakefile (help): * admin/admin.el (manual-doctype-string): * admin/charsets/Makefile.in (${charsetdir}/ALTERNATIVNYJ.map): * admin/charsets/mapconv: * lisp/net/soap-client.el (soap-create-envelope): * lisp/org/org.el (org-doi-server-url): * lisp/textmodes/bibtex.el (bibtex-generate-url-list): Prefer https: to http: un URLs. diff --git a/CONTRIBUTE b/CONTRIBUTE index f480ffec9b..d9502dcac3 100644 --- a/CONTRIBUTE +++ b/CONTRIBUTE @@ -23,8 +23,8 @@ The following shell commands then build and run Emacs from scratch: src/emacs For more details, see -http://www.emacswiki.org/emacs/GitQuickStartForEmacsDevs and -http://www.emacswiki.org/emacs/GitForEmacsDevs or see the file +https://www.emacswiki.org/emacs/GitQuickStartForEmacsDevs and +https://www.emacswiki.org/emacs/GitForEmacsDevs or see the file admin/notes/git-workflow. ** Getting involved with development diff --git a/GNUmakefile b/GNUmakefile index 274109ca48..9f279b7565 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -39,7 +39,7 @@ help: @echo "NOTE: This is a brief summary of some common make targets." @echo "For more detailed information, please read the files INSTALL," @echo "INSTALL.REPO, Makefile or visit this URL:" - @echo "http://www.gnu.org/prep/standards/html_node/Standard-Targets.html" + @echo "https://www.gnu.org/prep/standards/html_node/Standard-Targets.html" @echo "" @echo "make all -- compile and build Emacs" @echo "make install -- install Emacs" diff --git a/admin/admin.el b/admin/admin.el index 5968e32b05..76f5500862 100644 --- a/admin/admin.el +++ b/admin/admin.el @@ -337,7 +337,7 @@ Optional argument TYPE is type of output (nil means all)." (defconst manual-doctype-string "\n\n") +\"https://www.w3.org/TR/html4/loose.dtd\">\n\n") (defconst manual-meta-string " diff --git a/admin/automerge b/admin/automerge index 405fd9ed61..21a2cf0ee0 100755 --- a/admin/automerge +++ b/admin/automerge @@ -236,7 +236,7 @@ git fetch || die "fetch error" ## Rebasing would be incorrect, since it would rewrite the ## (already published) release branch commits. - ## Ref eg http://lists.gnu.org/r/emacs-devel/2014-12/msg01435.html + ## Ref eg https://lists.gnu.org/r/emacs-devel/2014-12/msg01435.html ## Instead, we throw away what we just did, and do the merge again. echo "Resetting..." git reset --hard $rev diff --git a/admin/charsets/Makefile.in b/admin/charsets/Makefile.in index 9f6b3e9e94..efeac266e5 100644 --- a/admin/charsets/Makefile.in +++ b/admin/charsets/Makefile.in @@ -141,7 +141,7 @@ ${charsetdir}/VSCII-2.map: ${GLIBC_CHARMAPS}/TCVN5712-1.gz ${mapconv} ${compact} ${charsetdir}/ALTERNATIVNYJ.map: ${charsetdir}/IBM866.map ${AM_V_GEN}(echo "# Modified from $(notdir $<) according to the chart at" && \ - echo "# http://www.cyrillic.com/ref/cyrillic/koi-8alt.html," && \ + echo "# https://web.archive.org/web/20100131045151/http://www.cyrillic.com/ref/cyrillic/koi-8alt.html" && \ echo "# with guesses for the Unicodes of the glyphs." && \ sed -e '1 d' \ -e '/0xF2/ s/ .*/ 0x2019/' \ @@ -226,8 +226,8 @@ ${lispintdir}/eucjp-ms.el: ${GLIBC_CHARMAPS}/EUC-JP-MS.gz ${eucjp_ms} # As Uni2JIS doesn't contain mappings of characters added to Unicode # recently, we add them manually here (including one correction for -# U+005C vs U+FF3C). These changes are based on bogytech's blog at -# http://bogytech.blogspot.jp/search/label/emacs. +# U+005C vs U+FF3C). These changes are based on bogytech's blog at: +# https://bogytech.blogspot.com/search/label/emacs ${charsetdir}/JISC6226.map: ${mapfiledir}/Uni2JIS ${mapconv} ${kuten} ${AM_V_GEN}(${run_mapconv} $< '/^[^#].*0-/' YASUOKA ${kuten} \ | sed -e '/0x2140/s/005C/FF3C/' && \ diff --git a/admin/charsets/cp932.awk b/admin/charsets/cp932.awk index 7fd3e9111f..27fdf02148 100644 --- a/admin/charsets/cp932.awk +++ b/admin/charsets/cp932.awk @@ -22,8 +22,7 @@ # Add a sort key 0, 1, 2, or 3 at the tail of each line as a comment # to realize the round trip mapping to Unicode works as described in -# this page: -# http://support.microsoft.com/default.aspx?scid=kb;EN-US;170559 +# https://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP932.TXT # Each sort key means as below: # 0: JISX0208 characters. # 1: NEC special characters. diff --git a/admin/charsets/eucjp-ms.awk b/admin/charsets/eucjp-ms.awk index 94e27d0065..0c9f94d0f4 100644 --- a/admin/charsets/eucjp-ms.awk +++ b/admin/charsets/eucjp-ms.awk @@ -21,7 +21,7 @@ # Commentary: # eucJP-ms is one of eucJP-open encoding defined at this page: -# http://home.m05.itscom.net/numa/cde/ucs-conv/appendix.html +# https://web.archive.org/web/20120207064433/http://home.m05.itscom.net/numa/cde/ucs-conv/appendix.html # This program reads the mapping file EUC-JP-MS (of glibc) and # generates the Elisp file eucjp-ms.el that defines two translation # tables 'eucjp-ms-decode' and 'eucjp-ms-encode'. diff --git a/admin/charsets/mapconv b/admin/charsets/mapconv index 8e19972f3d..2af715a776 100755 --- a/admin/charsets/mapconv +++ b/admin/charsets/mapconv @@ -51,17 +51,18 @@ case "$3" in SOURCE="";; CZYBORRA) BASE="$BASE.gz"; - SOURCE="http://czyborra.com/charsets/${BASE}";; + SOURCE="https://czyborra.com/charsets/${BASE}";; IANA) - SOURCE="http://www.iana.org/assignments/charset-reg/${BASE}";; + SOURCE="https://www.iana.org/assignments/charset-reg/${BASE}";; UNICODE) - SOURCE="http://www.unicode.org/Public/MAPPINGS/VENDORS/ADOBE/${BASE}";; + SOURCE="https://www.unicode.org/Public/MAPPINGS/VENDORS/ADOBE/${BASE}";; UNICODE2) - SOURCE="http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/${BASE}";; + SOURCE="https://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/${BASE}";; YASUOKA) BASE="$BASE.Z"; SOURCE="http://kanji.zinbun.kyoto-u.ac.jp/~yasuoka/ftp/CJKtable/${BASE}";; KANJI-DATABASE) + # FIXME: This URL no longer works. SOURCE="http://kanji-database.cvs.sourceforge.net/viewvc/*checkout*/kanji-database/kanji-database/data/cns2ucsdkw.txt?revision=1.4";; *) printf 'Unknown file type: %s\n' "$3" diff --git a/admin/charsets/mapfiles/README b/admin/charsets/mapfiles/README index 7e4493bdc6..4cc615bf89 100644 --- a/admin/charsets/mapfiles/README +++ b/admin/charsets/mapfiles/README @@ -15,7 +15,7 @@ files based on freely available information. * CP932.TXT Available at: - + * PTCP154 @@ -42,8 +42,8 @@ Available at: * stdenc.txt and symbol.txt Available at: - - + + (2) Newly created files diff --git a/admin/grammars/js.wy b/admin/grammars/js.wy index ff048d82e9..f5aca81d04 100644 --- a/admin/grammars/js.wy +++ b/admin/grammars/js.wy @@ -25,7 +25,7 @@ ;; The grammar itself is transcribed from the ECMAScript Language ;; Specification published at ;; -;; http://www.ecma-international.org/publications/standards/Ecma-262.htm +;; https://www.ecma-international.org/publications/standards/Ecma-262.htm ;; ;; and redistributed under the following license: diff --git a/admin/notes/bugtracker b/admin/notes/bugtracker index b890b89166..ac54f8de02 100644 --- a/admin/notes/bugtracker +++ b/admin/notes/bugtracker @@ -76,7 +76,7 @@ cc everyone on replies.) (Many people think the submitter SHOULD be automatically subscribed to subsequent discussion, but this does not seem to be implemented. -See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=37078 +See https://bugs.debian.org/37078 See also https://debbugs.gnu.org/5439 ) Do NOT send a separate copy to the bug list address, since this may @@ -155,7 +155,7 @@ Package: emacs Version: 23.0.60 Severity: minor -Remember to fix FOO, as discussed on emacs-devel at http://... . +Remember to fix FOO, as discussed on emacs-devel at https://... . ** Not interested in tracker control messages (tags being set, etc)? Discard mails matching: @@ -280,7 +280,7 @@ tag:tag # all bugs with given tag *** Usertags -See +See "Usertags" are very similar to tags: a set of labels that can be added to a bug. There are two differences between normal tags and user tags: @@ -385,7 +385,7 @@ will be assigned proper numbers). NB you cannot clone a merged bug. You'd think that trying to do so would just give you an unmerged copy of the specified bug number, but no: -http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=474742 +https://bugs.debian.org/474742 You must unmerge, clone, then re-merge. diff --git a/admin/notes/copyright b/admin/notes/copyright index e22db6bc55..5a0cf4d8d1 100644 --- a/admin/notes/copyright +++ b/admin/notes/copyright @@ -193,14 +193,14 @@ lib-src/etags.c After some investigation in Feb 2007, then to the best of our knowledge we believe that the original 1984 Emacs version was based on the version in BSD4.2. See for example this 1985 post from Ken Arnold: - + I have received enough requests for the current source to ctags to post it. Here is the latest version (what will go out with 4.3, modulo any bugs fixed during the beta period). It is the 4.2 ctags with recognition of yacc and lex tags added. See also a 1984 version of ctags (no copyright) posted to net.sources: - + Version of etags.c in emacs-16.56 duplicates comment typos. Accordingly, in Feb 2007 we added a 1984 copyright for the @@ -350,9 +350,7 @@ added or not, rms says (2007-02-25, "oldXmenu issues"): insque.c had no copyright notice until 2005. The version of insque.c added to Emacs 1992-01-27 is essentially the same as insremque.c added to glic three days later by Roland McGrath, with an FSF copyright and -GPL, but no ChangeLog entry: - +GPL, but no ChangeLog entry. To the best of his recollection, McGrath (who has a copyright assignment) was the author of this file (email from roland at frob.com to rms, 2007-02-23, "Where did insque.c come from?"). The FSF diff --git a/admin/notes/emba b/admin/notes/emba index cb0dbc4809..40fc88b88a 100644 --- a/admin/notes/emba +++ b/admin/notes/emba @@ -19,9 +19,6 @@ when a job fails. It sends notifications about test status to If you want to receive these notifications, please subscribe at . -Alternatively, these notifications can be read via gmane at -. - The messages contain a URL to the log file of the failed job, like . diff --git a/admin/notes/nextstep b/admin/notes/nextstep index a2e5ce2c9b..b053294880 100644 --- a/admin/notes/nextstep +++ b/admin/notes/nextstep @@ -65,9 +65,6 @@ functions are: Currently ctrl-g is not detected in as many circumstances as other emacsen. It is not certain whether this is due to the means of event loop integration, or errors of omission in the NS code. This is an area for improvement. -Also, see the article here and its containing thread: - -http://article.gmane.org/gmane.emacs.devel/92021/match=handling%5fsignal diff --git a/admin/notes/spelling b/admin/notes/spelling index a63d4bba84..b783227a37 100644 --- a/admin/notes/spelling +++ b/admin/notes/spelling @@ -8,4 +8,4 @@ Re "behavior" vs "behaviour", etc. - It's probably (IMHO --ttn, 2017-10-13) not a high priority to change existing text; use your best judgement (ask if unsure). -- http://lists.gnu.org/archive/html/emacs-devel/2005-06/msg00489.html +- https://lists.gnu.org/r/emacs-devel/2005-06/msg00489.html diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi index ad4be90aaf..17aaaea736 100644 --- a/doc/emacs/emacs.texi +++ b/doc/emacs/emacs.texi @@ -1316,7 +1316,7 @@ Emacs editors, all sharing common principles of organization. For information on the underlying philosophy of Emacs and the lessons learned from its development, see @cite{Emacs, the Extensible, Customizable Self-Documenting Display Editor}, available from -@url{http://hdl.handle.net/1721.1/5736}. +@url{https://dspace.mit.edu/handle/1721.1/5736}. This version of the manual is mainly intended for use with GNU Emacs installed on GNU and Unix systems. GNU Emacs can also be used on diff --git a/doc/emacs/mule.texi b/doc/emacs/mule.texi index dfd464c827..bca917de10 100644 --- a/doc/emacs/mule.texi +++ b/doc/emacs/mule.texi @@ -1790,7 +1790,7 @@ Reordering of bidirectional text into the @dfn{visual} order happens at display time. As a result, character positions no longer increase monotonically with their positions on display. Emacs implements the Unicode Bidirectional Algorithm (UBA) described in the -@uref{http://unicode.org/reports/tr9/, Unicode Standard Annex #9}, for +@uref{https://unicode.org/reports/tr9/, Unicode Standard Annex #9}, for reordering of bidirectional text for display. It deviates from the UBA only in how continuation lines are displayed when text direction is opposite to the base paragraph direction, diff --git a/doc/emacs/package.texi b/doc/emacs/package.texi index 4b33f250c4..2c09ca8902 100644 --- a/doc/emacs/package.texi +++ b/doc/emacs/package.texi @@ -179,7 +179,7 @@ maintained by the Emacs developers. This is controlled by the variable @code{package-archives}, whose value is a list of package archives known to Emacs. Each list element must have the form @code{(@var{id} . @var{location})}, where @var{id} is the name of a -package archive and @var{location} is the @acronym{HTTP} address or +package archive and @var{location} is the @acronym{URL} or name of the package archive directory. You can alter this list if you wish to use third party package archives---but do so at your own risk, and use only third parties that you think you can trust! diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi index 618ea16fcf..8596db7421 100644 --- a/doc/lispref/frames.texi +++ b/doc/lispref/frames.texi @@ -3861,7 +3861,7 @@ drop. @vindex dnd-protocol-alist When an URL is dropped on Emacs it may be a file, but it may also be -another URL type (ftp, http, etc.). Emacs first checks +another URL type (https, etc.). Emacs first checks @code{dnd-protocol-alist} to determine what to do with the URL@. If there is no match there and if @code{browse-url-browser-function} is an alist, Emacs looks for a match there. If no match is found the diff --git a/doc/lispref/nonascii.texi b/doc/lispref/nonascii.texi index a56a365e9e..612c362f4a 100644 --- a/doc/lispref/nonascii.texi +++ b/doc/lispref/nonascii.texi @@ -453,13 +453,13 @@ during text processing and display. Thus, character properties are an important part of specifying the character's semantics. @c FIXME: Use the latest URI of this chapter? -@c http://www.unicode.org/versions/latest/ch04.pdf +@c https://www.unicode.org/versions/latest/ch04.pdf On the whole, Emacs follows the Unicode Standard in its implementation of character properties. In particular, Emacs supports the -@uref{http://www.unicode.org/reports/tr23/, Unicode Character Property +@uref{https://www.unicode.org/reports/tr23/, Unicode Character Property Model}, and the Emacs character property database is derived from the Unicode Character Database (@acronym{UCD}). See the -@uref{http://www.unicode.org/versions/latest/ch04.pdf, Character +@uref{https://www.unicode.org/versions/Unicode12.1.0/ch04.pdf, Character Properties chapter of the Unicode Standard}, for a detailed description of Unicode character properties and their meaning. This section assumes you are already familiar with that chapter of the diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi index ddbc8a8294..fae23cb075 100644 --- a/doc/lispref/os.texi +++ b/doc/lispref/os.texi @@ -2718,7 +2718,7 @@ interpreted as icon name. @item :category @var{category} The type of notification this is, a string. See the -@uref{http://developer.gnome.org/notification-spec/#categories, +@uref{https://developer.gnome.org/notification-spec/#categories, Desktop Notifications Specification} for a list of standard categories. diff --git a/doc/lispref/package.texi b/doc/lispref/package.texi index eb34b8e0af..57f4cbc5db 100644 --- a/doc/lispref/package.texi +++ b/doc/lispref/package.texi @@ -159,7 +159,7 @@ the various headers, as illustrated by the following example: ;; Version: 1.3 ;; Package-Requires: ((flange "1.0")) ;; Keywords: multimedia, hypermedia -;; URL: http://example.com/jrhacker/superfrobnicate +;; URL: https://example.com/jrhacker/superfrobnicate @dots{} @@ -351,7 +351,7 @@ for a multi-file package, it is the package tar file. You can also sign the archive's contents file in the same way. Make the @file{.sig} files available in the same location as the packages. You should also make your public key available for people to download; -e.g., by uploading it to a key server such as @url{http://pgp.mit.edu/}. +e.g., by uploading it to a key server such as @url{https://pgp.mit.edu/}. When people install packages from your archive, they can use your public key to verify the signatures. diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi index 4c7853bae8..2ba5b1c893 100644 --- a/doc/lispref/processes.texi +++ b/doc/lispref/processes.texi @@ -2690,8 +2690,8 @@ override this. @item :service @var{service} @var{service} specifies a port number to connect to; or, for a server, the port number to listen on. It should be a service name like -@samp{"http"} that translates to a port number, or an integer like @samp{80} -or an integer string like @samp{"80"} that specifies the port number +@samp{"https"} that translates to a port number, or an integer like @samp{443} +or an integer string like @samp{"443"} that specifies the port number directly. For a server, it can also be @code{t}, which means to let the system select an unused port number. diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index 955ad6130c..d7b04d2934 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi @@ -5310,7 +5310,7 @@ the value if contains a valid JSON object; otherwise it signals the The @code{jsonrpc} library implements the @acronym{JSONRPC} specification, version 2.0, as it is described in -@uref{http://www.jsonrpc.org/}. As the name suggests, JSONRPC is a +@uref{https://www.jsonrpc.org/}. As the name suggests, JSONRPC is a generic @dfn{Remote Procedure Call} protocol designed around @acronym{JSON} objects, which you can convert to and from Lisp objects (@pxref{Parsing JSON}). @@ -5325,7 +5325,7 @@ generic @dfn{Remote Procedure Call} protocol designed around @node JSONRPC Overview @subsection Overview -Quoting from the @uref{http://www.jsonrpc.org/, spec}, JSONRPC "is +Quoting from the @uref{https://www.jsonrpc.org/, spec}, JSONRPC "is transport agnostic in that the concepts can be used within the same process, over sockets, over http, or in many various message passing environments." diff --git a/doc/lispref/tips.texi b/doc/lispref/tips.texi index 855b284a15..6d84cfef53 100644 --- a/doc/lispref/tips.texi +++ b/doc/lispref/tips.texi @@ -958,7 +958,7 @@ explains these conventions, starting with an example: ;; Created: 14 Jul 2010 @group ;; Keywords: languages -;; URL: http://example.com/foo +;; URL: https://example.com/foo ;; This file is not part of GNU Emacs. diff --git a/doc/misc/auth.texi b/doc/misc/auth.texi index 850441e25d..93a301dcb1 100644 --- a/doc/misc/auth.texi +++ b/doc/misc/auth.texi @@ -279,7 +279,7 @@ machine gmail2 login account2@@gmail.com password "account2 password" port imap @chapter Secret Service API The @dfn{Secret Service API} is a standard from -@uref{http://www.freedesktop.org/wiki/Specifications/secret-storage-spec,,freedesktop.org} +@uref{https://www.freedesktop.org/wiki/Specifications/secret-storage-spec/,,freedesktop.org} to securely store passwords and other confidential information. This API is implemented by system daemons such as the GNOME Keyring and the KDE Wallet (these are GNOME and KDE packages respectively and should @@ -442,7 +442,7 @@ then fall back to @file{~/.authinfo.gpg}. @node The Unix password store @chapter The Unix password store -@uref{http://www.passwordstore.org,,The standard unix password +@uref{https://www.passwordstore.org,,The standard unix password manager} (or just @code{pass}) stores your passwords in @code{gpg}-protected files following the Unix philosophy. The store location (any directory) must be specified in the diff --git a/doc/misc/autotype.texi b/doc/misc/autotype.texi index 96262fcb53..a354383cc9 100644 --- a/doc/misc/autotype.texi +++ b/doc/misc/autotype.texi @@ -592,8 +592,7 @@ specify that @kbd{M-x quickurl} should insert @var{URL} if the word @example (("FSF" "https://www.fsf.org/" "The Free Software Foundation") - ("emacs" . "http://www.emacs.org/") - ("hagbard" "http://www.hagbard.demon.co.uk" "Hagbard's World")) + ("emacs" . "https://www.gnu.org/software/emacs/")) @end example @findex quickurl-add-url diff --git a/doc/misc/cc-mode.texi b/doc/misc/cc-mode.texi index 1df9dce227..217261090b 100644 --- a/doc/misc/cc-mode.texi +++ b/doc/misc/cc-mode.texi @@ -393,7 +393,7 @@ version 5.34. @ccmode{} supports the editing of C, C++, Objective-C, Java, CORBA's Interface Definition Language, Pike@footnote{A C-like scripting language with its roots in the LPC language used in some MUD -engines. See @uref{http://pike.ida.liu.se/}.} and AWK files. In this +engines. See @uref{https://pike.lysator.liu.se/}.} and AWK files. In this way, you can easily set up consistent font locking and coding styles for use in editing all of these languages, although AWK is not yet as uniformly integrated as the other languages. @@ -2693,7 +2693,7 @@ The classic Stroustrup style for C++ code. Popular C++ coding standards as defined by ``Programming in C++, Rules and Recommendations,'' Erik Nyquist and Mats Henricson, Ellemtel@footnote{This document is available at -@uref{http://www.doc.ic.ac.uk/lab/cplus/c++.rules/} among other +@uref{https://www.doc.ic.ac.uk/lab/cplus/c++.rules/} among other places.}. @c N.B. This URL was still valid at 2005/8/28 (ACM). @@ -2705,7 +2705,7 @@ C coding standard for Linux (the kernel). @cindex Python style C coding standard for Python extension modules@footnote{Python is a high level scripting language with a C/C++ foreign function interface. -For more information, see @uref{http://www.python.org/}.}. +For more information, see @uref{https://www.python.org/}.}. @item java @cindex Java style @@ -6014,7 +6014,7 @@ set_line (line_t @{point_t@{0.4, 0.2@}, ^ enclosing parenthesis. @end group @end example - + The middle line of that example will have a syntactic context with three syntactic symbols, @code{arglist-cont-nonempty}, @@ -6059,7 +6059,7 @@ struct STR @{ @sssTBasicOffset{} @end group @end example - + Note that the syntactic context of the @code{brace-list-intro} line also has a syntactic element with the symbol @code{brace-list-entry} @@ -6100,7 +6100,7 @@ struct STR @{ @}; @end group @end example - + Note that the syntactic context of the @code{brace-list-intro} line also has a syntactic element with the symbol @code{brace-list-entry} diff --git a/doc/misc/dbus.texi b/doc/misc/dbus.texi index 7c7612f579..43bf2f75fe 100644 --- a/doc/misc/dbus.texi +++ b/doc/misc/dbus.texi @@ -47,7 +47,7 @@ modify this GNU manual.'' This manual documents an API for usage of D-Bus in Emacs. D-Bus is a message bus system, a simple way for applications to talk to one another. An overview of D-Bus can be found at -@uref{http://dbus.freedesktop.org/}. +@uref{https://dbus.freedesktop.org/}. @ifnottex @insertcopying @@ -328,7 +328,7 @@ and @code{direction}. The @code{name} attribute is optional. The in D-Bus. For a discussion of D-Bus types and their Lisp representation see @ref{Type Conversion}.@footnote{D-Bus signatures are explained in the D-Bus specification -@uref{http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-signatures}.} +@uref{https://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-signatures}.} The @code{direction} attribute of an @code{arg} element can be only @samp{in} or @samp{out}; in case it is omitted, it defaults to @samp{in}. @@ -415,7 +415,7 @@ string and 2 boolean values.@footnote{ The interfaces of the service @samp{org.freedesktop.Hal} are described in @c Previous link is gone. Since HAL is now obsolete, this URL @c (unchanged in ~ 4 years) feels like it might go too... -@uref{http://people.freedesktop.org/~dkukawka/hal-spec-git/hal-spec.html#interfaces, +@uref{https://people.freedesktop.org/~dkukawka/hal-spec-git/hal-spec.html#interfaces, the HAL specification}.} @end defun @@ -663,13 +663,13 @@ returned by @code{dbus-introspect-get-signal-names}. Example: Interfaces can have properties. These can be exposed via the @samp{org.freedesktop.DBus.Properties} interface@footnote{See -@uref{http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-properties}}. +@uref{https://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-properties}}. That is, properties can be retrieved and changed during lifetime of an element. A generalized interface is @samp{org.freedesktop.DBus.Objectmanager}@footnote{See -@uref{http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager}}, +@uref{https://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager}}, which returns objects, their interfaces and properties for a given service in just one call. @@ -839,7 +839,7 @@ belong to. Example: @end lisp Default annotation names@footnote{See -@uref{http://dbus.freedesktop.org/doc/dbus-specification.html#introspection-format}} +@uref{https://dbus.freedesktop.org/doc/dbus-specification.html#introspection-format}} are @table @samp diff --git a/doc/misc/efaq.texi b/doc/misc/efaq.texi index a591b88201..219ad248cc 100644 --- a/doc/misc/efaq.texi +++ b/doc/misc/efaq.texi @@ -280,9 +280,8 @@ For information on some of the files in the @file{etc} directory, @pxref{Informational files for Emacs}. @node Common acronyms -@section What are FSF, LPF, GNU, RMS, FTP, and GPL? +@section What are FSF, GNU, RMS, FTP, and GPL? @cindex FSF, definition of -@cindex LPF, definition of @cindex GNU, definition of @cindex RMS, definition of @cindex Stallman, Richard, acronym for @@ -297,9 +296,6 @@ For information on some of the files in the @file{etc} directory, @item FSF Free Software Foundation -@item LPF -League for Programming Freedom - @item GNU GNU's Not Unix @@ -314,10 +310,6 @@ GNU General Public License @end table -Avoid confusing the FSF and the LPF@. The LPF opposes -look-and-feel copyrights and software patents. The FSF aims to make -high quality free software available for everyone. - The word ``free'' in the title of the Free Software Foundation refers to ``freedom,'' not ``zero cost.'' Anyone can charge any price for GPL-covered software that they want to. However, in practice, the @@ -334,7 +326,6 @@ This chapter contains general questions having to do with Emacs, the Free Software Foundation, and related organizations. @menu -* The LPF:: * Real meaning of copyleft:: * Guidelines for newsgroup postings:: * Newsgroup archives:: @@ -343,17 +334,6 @@ Free Software Foundation, and related organizations. * Contacting the FSF:: @end menu -@node The LPF -@section What is the LPF? -@cindex LPF, description of -@cindex League for Programming Freedom -@cindex Software patents, opposition to -@cindex Patents for software, opposition to - -The LPF opposes the expanding danger of software patents and -look-and-feel copyrights. More information on the LPF's views is -available at @uref{http://progfree.org/, the LPF home page}. - @node Real meaning of copyleft @section What is the real legal meaning of the GNU copyleft? @cindex Copyleft, real meaning of @@ -427,11 +407,6 @@ Web-based Usenet search services, such as @uref{http://groups.google.com/groups/dir?q=gnu&, Google}, also archive the @code{gnu.*} groups. -You can also read the archives of the @code{gnu.*} groups and post new -messages at @uref{http://gmane.org/, Gmane}. Gmane is a service that -presents mailing lists as newsgroups (even those without a traditional -mail-to-news gateway). - @node Reporting bugs @section Where should I report bugs and other problems with Emacs? @cindex Bug reporting diff --git a/doc/misc/eieio.texi b/doc/misc/eieio.texi index f56b2b67a4..f20af3bb22 100644 --- a/doc/misc/eieio.texi +++ b/doc/misc/eieio.texi @@ -1006,7 +1006,7 @@ what CLOS does when a monotonic class structure is defined. This is derived from the Dylan language documents by Kim Barrett et al.: A Monotonic Superclass Linearization for Dylan -Retrieved from: http://192.220.96.201/dylan/linearization-oopsla96.html +Retrieved from: https://doi.org/10.1145/236338.236343 @end table @node Predicates diff --git a/doc/misc/emacs-gnutls.texi b/doc/misc/emacs-gnutls.texi index add79d12e4..36a490b1ae 100644 --- a/doc/misc/emacs-gnutls.texi +++ b/doc/misc/emacs-gnutls.texi @@ -90,7 +90,7 @@ alias of the second. There's one way to find out if GnuTLS is available, by calling @code{gnutls-available-p}. This is a little bit trickier on the W32 (Windows) platform, but if you have the GnuTLS DLLs (available from -@url{http://sourceforge.net/projects/ezwinports/files/} thanks to Eli +@url{https://sourceforge.net/projects/ezwinports/files/} thanks to Eli Zaretskii) in the same directory as Emacs, you should be OK. @defun gnutls-available-p diff --git a/doc/misc/epa.texi b/doc/misc/epa.texi index 330ce7092f..b1ca8d92a2 100644 --- a/doc/misc/epa.texi +++ b/doc/misc/epa.texi @@ -312,7 +312,7 @@ blobs inside a message body, not using modern MIME format. NOTE: Inline OpenPGP is not recommended and you should consider to use PGP/MIME@. See -@uref{http://josefsson.org/inline-openpgp-considered-harmful.html, +@uref{https://josefsson.org/inline-openpgp-considered-harmful.html, Inline OpenPGP in E-mail is bad@comma{} Mm'kay?}. @noindent diff --git a/doc/misc/erc.texi b/doc/misc/erc.texi index e1d2217806..a6b39c2cbe 100644 --- a/doc/misc/erc.texi +++ b/doc/misc/erc.texi @@ -699,7 +699,7 @@ stuff, to the current ERC buffer." ;; This causes ERC to connect to the IRC server on your own machine (if ;; you have one) upon hitting C-c e b. Replace MYNICK with your IRC -;; nick. Often, people like to run bitlbee (http://bitlbee.org/) as an +;; nick. Often, people like to run bitlbee (https://bitlbee.org/) as an ;; AIM/Jabber/MSN to IRC gateway, so that they can use ERC to chat with ;; people on those networks. (global-set-key "\C-ceb" (lambda () (interactive) @@ -801,7 +801,7 @@ or if you have bugs to report, there are several places you can go. @itemize @bullet @item -@uref{http://www.emacswiki.org/cgi-bin/wiki/ERC} is the +@uref{https://www.emacswiki.org/emacs/ERC} is the emacswiki.org page for ERC@. Anyone may add tips, hints, etc.@: to it. @item @@ -838,7 +838,7 @@ general. @c mlang@@delysid.org, alex@@gnu.org In June 2001, Mario Lang and Alex Schroeder took over development and created a ERC Project at -@uref{http://sourceforge.net/projects/erc}. +@uref{https://sourceforge.net/projects/erc}. In reaction to a mail about the new ERC development effort, Sergey Berezin said, ``First of all, I'm glad that my version of ERC is being diff --git a/doc/misc/ert.texi b/doc/misc/ert.texi index d2d86555e3..2dbba095d6 100644 --- a/doc/misc/ert.texi +++ b/doc/misc/ert.texi @@ -53,7 +53,7 @@ ERT is similar to tools for other environments such as JUnit, but has unique features that take advantage of the dynamic and interactive nature of Emacs. Despite its name, it works well both for test-driven development (see -@url{http://en.wikipedia.org/wiki/Test-driven_development}) and for +@url{https://en.wikipedia.org/wiki/Test-driven_development}) and for traditional software development methods. @menu @@ -899,11 +899,11 @@ For information on mocks, stubs, fixtures, or test suites, see below. Stubbing out functions or using so-called @emph{mocks} can make it easier to write tests. See -@url{http://en.wikipedia.org/wiki/Mock_object} for an explanation of +@url{https://en.wikipedia.org/wiki/Mock_object} for an explanation of the corresponding concepts in object-oriented languages. ERT does not have built-in support for mocks or stubs. The package -@code{el-mock} (see @url{http://www.emacswiki.org/emacs/el-mock.el}) +@code{el-mock} (see @url{https://www.emacswiki.org/emacs/el-mock.el}) offers mocks for Emacs Lisp and can be used in conjunction with ERT. diff --git a/doc/misc/eudc.texi b/doc/misc/eudc.texi index 568f94ba7c..9e91871673 100644 --- a/doc/misc/eudc.texi +++ b/doc/misc/eudc.texi @@ -131,7 +131,7 @@ complement to the DAP itself. LDAP servers usually store (but are not limited to) information about people such as their name, phone number, email address, office location, etc@enddots{} More information about LDAP can be found at -@url{http://www.openldap.org/}. +@url{https://www.openldap.org/}. EUDC requires external support to access LDAP directory servers (@pxref{LDAP Configuration}) @@ -193,7 +193,7 @@ email composition buffers (@pxref{Inline Query Expansion}) LDAP support is added by means of @file{ldap.el}, which is part of Emacs. @file{ldap.el} needs an external program called @command{ldapsearch}, available as part of OpenLDAP -(@url{http://www.openldap.org/}). The configurations in this section +(@url{https://www.openldap.org/}). The configurations in this section were tested with OpenLDAP 2.4.23. Most servers use LDAP-over-SSL these days; the examples here reflect diff --git a/doc/misc/eww.texi b/doc/misc/eww.texi index 63f676ec75..315b4b0194 100644 --- a/doc/misc/eww.texi +++ b/doc/misc/eww.texi @@ -319,7 +319,7 @@ Gnus. He started writing an Emacs HTML rendering library, @code{shr.el}, to read blogs in Gnus. He eventually added a web browser front end and HTML form support. Which resulted in EWW, the Emacs Web Wowser. EWW was announced on 16 June 2013: -@url{http://lars.ingebrigtsen.no/2013/06/16/eww/}. +@url{https://lars.ingebrigtsen.no/2013/06/16/eww/}. EWW was then moved from the Gnus repository to GNU Emacs and several developers started contributing to it as well. diff --git a/doc/misc/gnus-faq.texi b/doc/misc/gnus-faq.texi index f295c997cb..b0dc9c3ba3 100644 --- a/doc/misc/gnus-faq.texi +++ b/doc/misc/gnus-faq.texi @@ -164,7 +164,7 @@ Gnus is released independent from releases of Emacs. Therefore, the version bundled with Emacs might not be up to date (e.g., Gnus 5.9 bundled with Emacs 21 is outdated). You can get the latest released version of Gnus from -@uref{http://www.gnus.org/dist/gnus.tar.gz} +@uref{https://www.gnus.org/dist/gnus.tar.gz} or from @uref{https://ftp.gnus.org/pub/gnus/gnus.tar.gz}. @@ -178,10 +178,9 @@ What to do with the tarball now? Untar it via @samp{tar xvzf gnus.tar.gz} and do the common @samp{./configure; make; make install} circle. (under MS-Windows either get the Cygwin environment from -@uref{http://www.cygwin.com} +@uref{https://www.cygwin.com} which allows you to do what's described above or unpack the -tarball with some packer (e.g., Winace from -@uref{http://www.winace.com}) +tarball with some packer (e.g., Winace) and use the batch-file make.bat included in the tarball to install Gnus.) If you don't want to (or aren't allowed to) install Gnus system-wide, you can install it in your home directory and add the @@ -1367,12 +1366,12 @@ Is there a spell-checker? Perhaps even on-the-fly spell-checking? You can use ispell.el to spell-check stuff in Emacs. So the first thing to do is to make sure that you've got either -@uref{http://fmg-www.cs.ucla.edu/fmg-members/geoff/ispell.html, ispell} -or @uref{http://aspell.sourceforge.net/, aspell} +@uref{https://www.cs.hmc.edu/~geoff/ispell.html, ispell} +or @uref{http://aspell.net, aspell} installed and in your Path. Then you need -@uref{http://www.kdstevens.com/~stevens/ispell-page.html, ispell.el} +ispell.el and for on-the-fly spell-checking -@uref{http://www-sop.inria.fr/members/Manuel.Serrano/flyspell/flyspell.html, flyspell.el}. +@uref{https://www-sop.inria.fr/members/Manuel.Serrano/flyspell/flyspell.html, flyspell.el}. Ispell.el is shipped with Emacs, flyspell.el is shipped with Emacs, so there should be no need to install them manually. @@ -1515,7 +1514,7 @@ cat file.face | sed 's/["\\]/\\&/g' > file.face.quoted @noindent If you can't use compface, there's an online X-face converter at -@uref{http://www.dairiki.org/xface/}. +@uref{https://www.dairiki.org/xface/}. If you use MS Windows, you could also use the WinFace program, which used to be available from @indicateurl{http://www.xs4all.nl/~walterln/winface/}. @@ -1713,7 +1712,7 @@ The easiest way is to tell your old mail program to export the messages in mbox format. Most Unix mailers are able to do this, if you come from the MS Windows world, you may find tools at -@uref{http://mbx2mbox.sourceforge.net/}. +@uref{https://sourceforge.net/projects/mbx2mbox/}. Now you've got to import this mbox file into Gnus. To do this, create a nndoc group based on the mbox file by @@ -1787,7 +1786,7 @@ How to search for a specific message? There are several ways for this, too. For a posting from a Usenet group the easiest solution is probably to ask -@uref{http://groups.google.com, groups.google.com}, +@uref{https://groups.google.com, groups.google.com}, if you found the posting there, tell Google to display the raw message, look for the message-id, and say @samp{M-^ the@@message.id @key{RET}} in a @@ -1942,21 +1941,21 @@ when you're online. Let's talk about Unix systems first: For the news part, the easiest solution is a small nntp server like @uref{http://www.leafnode.org/, Leafnode} or -@uref{http://infa.abo.fi/~patrik/sn/, sn}, +@uref{http://patrik.iki.fi/sn/, sn}, of course you can also install a full featured news server like -@uref{http://www.isc.org/software/inn/, inn}. +@uref{https://www.isc.org/othersoftware/, inn}. Then you want to fetch your Mail, popular choices -are @uref{http://www.catb.org/~esr/fetchmail/, fetchmail} +are @uref{http://www.fetchmail.info/, fetchmail} and @uref{http://pyropus.ca/software/getmail/, getmail}. You should tell those to write the mail to your disk and Gnus to read it from there. Last but not least the mail sending part: This can be done with every MTA like -@uref{http://www.sendmail.org/, sendmail} or -@uref{http://www.exim.org/, exim}. +@uref{https://www.proofpoint.com/us/open-source-email-solution, sendmail} or +@uref{https://www.exim.org/, exim}. On windows boxes I'd vote for -@uref{http://www.tglsoft.de/, Hamster}, +@uref{http://www.tglsoft.de/freeware_hamster.html, Hamster}, it's a small freeware, open-source program which fetches your mail and news from remote servers and offers them to Gnus (or any other mail and/or news reader) via nntp @@ -2100,7 +2099,7 @@ Which websites should I know? @subsubheading Answer The most important one is the -@uref{http://www.gnus.org, official Gnus website}. +@uref{https://www.gnus.org, official Gnus website}. Tell me about other sites which are interesting. @@ -2111,9 +2110,7 @@ Which mailing lists and newsgroups are there? @subsubheading Answer -There's the newsgroup gnu.emacs.gnus (also available as -@uref{http://dir.gmane.org/gmane.emacs.gnus.user, -gmane.emacs.gnus.user}) which deals with general Gnus +There's the newsgroup gnu.emacs.gnus which deals with general Gnus questions. If you have questions about development versions of Gnus, you should better ask on the ding mailing list, see below. @@ -2124,9 +2121,7 @@ the above groups). If you speak German, there's de.comm.software.gnus. The ding mailing list (ding@@gnus.org) deals with development of -Gnus. You can read the ding list via NNTP, too under the name -@uref{http://dir.gmane.org/gmane.emacs.gnus.general, -gmane.emacs.gnus.general} from news.gmane.org. +Gnus. @node FAQ 8-5 @subsubheading Question 8.5 diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index 4824cdc962..afa45d10f0 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi @@ -2629,6 +2629,9 @@ type. @xref{Document Groups}. Create one of the groups mentioned in @code{gnus-useful-groups} (@code{gnus-group-make-useful-group}). +@c FIXME: Gmane.org is no longer working; fix the Gmane referrences +@c in this file accordingly. + @item G w @kindex G w @r{(Group)} @findex gnus-group-make-web-group @@ -3234,7 +3237,7 @@ group by reverse date to see the latest news at the top and an Debian daily news group @code{gmane.linux.debian.user.news} from news.gmane.org. The @acronym{RSS} group corresponds to the Debian weekly news RSS feed -@url{http://packages.debian.org/unstable/newpkg_main.en.rdf}, +@url{https://packages.debian.org/unstable/newpkg_main.en.rdf}, @xref{RSS}. @lisp @@ -9164,10 +9167,10 @@ Use @uref{http://emacs-w3m.namazu.org/, emacs-w3m}. Use @uref{http://w3m.sourceforge.net/, w3m}. @item links -Use @uref{http://links.sf.net/, Links}. +Use @uref{https://almende.github.io/chap-links-library/, CHAP Links}. @item lynx -Use @uref{http://lynx.isc.org/, Lynx}. +Use @uref{https://lynx.browser.org/, Lynx}. @item html2text Use html2text---a simple @acronym{HTML} converter included with Gnus. @@ -9591,7 +9594,7 @@ Picons, on the other hand, reside on your own system, and Gnus will try to match the headers to what you have (@pxref{Picons}). Gravatars reside on-line and are fetched from -@uref{http://www.gravatar.com/} (@pxref{Gravatars}). +@uref{https://en.gravatar.com/} (@pxref{Gravatars}). All these functions are toggles---if the elements already exist, they'll be removed. @@ -13897,7 +13900,7 @@ installed. You then define a server as follows: @findex nntp-open-ssl-stream @item nntp-open-ssl-stream Opens a connection to a server over a @dfn{secure} channel. To use -this you must have @uref{http://www.openssl.org, OpenSSL} +this you must have @uref{https://www.openssl.org/, OpenSSL} @ignore @c Defunct URL, ancient package, so don't mention it. or @uref{ftp://ftp.psy.uq.oz.au/pub/Crypto/SSL, SSLeay} @@ -16411,7 +16414,7 @@ have to set this variable to @code{t}. The default is @code{nil}. @code{nnmaildir} stores mail in the maildir format, with each maildir corresponding to a group in Gnus. This format is documented here: -@uref{http://cr.yp.to/proto/maildir.html}. @code{nnmaildir} +@uref{https://cr.yp.to/proto/maildir.html}. @code{nnmaildir} also stores extra information in the @file{.nnmaildir/} directory within a maildir. @@ -17083,7 +17086,7 @@ Some web sites have an RDF Site Summary (@acronym{RSS}). @acronym{RSS} is a format for summarizing headlines from news related sites (such as BBC or CNN). But basically anything list-like can be presented as an @acronym{RSS} feed: weblogs, changelogs or recent -changes to a wiki (e.g., @url{http://cliki.net/site/recent-changes}). +changes to a wiki (e.g., @url{https://cliki.net/site/recent-changes}). @acronym{RSS} has a quite regular and nice interface, and it's possible to get the information Gnus needs to keep groups updated. @@ -20864,6 +20867,7 @@ The kill to score conversion package isn't included in Emacs by default. You can fetch it from the contrib directory of the Gnus distribution or from @uref{http://heim.ifi.uio.no/~larsi/ding-various/gnus-kill-to-score.el}. +@c FIXME: The above URL no longer works. If your old kill files are very complex---if they contain more non-@code{gnus-kill} forms than not, you'll have to convert them by @@ -21370,9 +21374,6 @@ to get a group name. By default this is @code{$HOME/Mail}. FIXME: Say something more here. -Documentation for swish-e may be found at the swish-e homepage -@uref{http://swish-e.org} - @table @code @item nnir-swish-e-program @@ -23557,7 +23558,7 @@ represent the author of the message. @cindex face @findex gnus-article-display-face The contents of a @code{Face} header must be a base64 encoded PNG image. -See @uref{http://quimby.gnus.org/circus/face/} for the precise +See @uref{https://quimby.gnus.org/circus/face/} for the precise specifications. The @code{gnus-face-properties-alist} variable affects the appearance of @@ -23681,7 +23682,7 @@ in either monochrome @code{XBM} format or color @code{XPM} and @vindex gnus-picon-databases For instructions on obtaining and installing the picons databases, point your Web browser at -@uref{http://www.cs.indiana.edu/picons/ftp/index.html}. +@uref{https://cs.indiana.edu/ftp/faces/picons/}. If you are using Debian GNU/Linux, saying @samp{apt-get install picon-.*} will install the picons where Gnus can find them. @@ -23750,7 +23751,7 @@ interesting. A gravatar is an image registered to an e-mail address. -You can submit yours on-line at @uref{http://www.gravatar.com}. +You can submit yours on-line at @uref{https://en.gravatar.com/}. The following variables offer control over how things are displayed. @@ -24147,8 +24148,7 @@ compute a hash collision up to a certain number of bits. The resulting hashcash cookie is inserted in a @samp{X-Hashcash:} header. For more details, and for the external application @code{hashcash} you need to install to use this feature, see -@uref{http://www.hashcash.org/}. Even more information can be found -at @uref{http://www.camram.org/}. +@uref{http://www.hashcash.org/}. If you wish to generate hashcash for each message you send, you can customize @code{message-generate-hashcash} (@pxref{Mail Headers, ,Mail @@ -24999,7 +24999,7 @@ added to a group's @code{spam-process} parameter, the spam-marked articles groups will be reported to the Gmane administrators via a HTTP request. -Gmane can be found at @uref{http://gmane.org}. +Gmane was formerly found at @uref{http://gmane.org}. @emph{WARNING} @@ -26505,7 +26505,7 @@ but at the common table.@* If you want to investigate the person responsible for this outrage, you can point your (feh!) web browser to -@uref{http://quimby.gnus.org/}. This is also the primary +@uref{https://quimby.gnus.org/}. This is also the primary distribution point for the new and spiffy versions of Gnus, and is known as The Site That Destroys Newsrcs And Drives People Mad. @@ -26567,9 +26567,7 @@ Gnus 5.10 on May 1st 2003 (24 releases). On the January 4th 2004, No Gnus was begun. -On April 19, 2010 Gnus development was moved to Git. See -http://git.gnus.org for details (http://www.gnus.org will be updated -with the information when possible). +On April 19, 2010 Gnus development was moved to Git. On the January 31th 2012, Ma Gnus was begun. diff --git a/doc/misc/message.texi b/doc/misc/message.texi index 7089bb5dfe..9b79fe687d 100644 --- a/doc/misc/message.texi +++ b/doc/misc/message.texi @@ -1143,7 +1143,7 @@ standards, OpenSSL and so on. The @acronym{S/MIME} support in Message (and @acronym{MML}) can use OpenSSL@. OpenSSL performs the actual @acronym{S/MIME} sign/encrypt -operations. OpenSSL can be found at @uref{http://www.openssl.org/}. +operations. OpenSSL can be found at @uref{https://www.openssl.org/}. OpenSSL 0.9.6 and later should work. Version 0.9.5a cannot extract mail addresses from certificates, and it insert a spurious CR character into @acronym{MIME} separators so you may wish to avoid it if you would like @@ -1291,7 +1291,7 @@ to change this behavior you can customize the This causes to sign and encrypt in two passes, thus generating a message that can be understood by PGP version 2. -(Refer to @uref{http://www.gnupg.org/gph/en/pgp2x.html} for more +(Refer to @uref{https://www.gnupg.org/gph/en/pgp2x.html} for more information about the problem.) @node Encrypt-to-self diff --git a/doc/misc/mh-e.texi b/doc/misc/mh-e.texi index 25dd53c4fb..9d249fb0ec 100644 --- a/doc/misc/mh-e.texi +++ b/doc/misc/mh-e.texi @@ -17,8 +17,8 @@ @set UPDATE-MONTH April, 2016 @c Other variables. -@set MH-BOOK-HOME http://rand-mh.sourceforge.net/book/mh -@set MH-E-HOME http://mh-e.sourceforge.net/ +@set MH-BOOK-HOME https://rand-mh.sourceforge.io/book/ +@set MH-E-HOME https://mh-e.sourceforge.io/ @c Copyright @copying @@ -256,9 +256,9 @@ This manual is available in both Info and online formats. The Info version is distributed with Emacs and can be accessed with the @command{info} command (@samp{info mh-e}) or within Emacs (@kbd{C-h i m mh-e @key{RET}}). The online version is available at -@uref{http://mh-e.sourceforge.net/manual/, SourceForge}. Another great +@uref{https://mh-e.sourceforge.io/manual/, SourceForge}. Another great online resource is the book -@uref{http://rand-mh.sourceforge.net/book/, @cite{MH & nmh: Email for +@uref{https://rand-mh.sourceforge.io/book/, @cite{MH & nmh: Email for Users & Programmers}} (also known as @dfn{the MH book}). I hope you enjoy this manual! If you have any comments, or suggestions @@ -554,8 +554,8 @@ to install MH or tell MH-E where to find MH. If you don't have MH on your system already, you must install a variant of MH@. The Debian mh-e package does this for you automatically (@pxref{Getting MH-E}). Most people use -@uref{http://www.nongnu.org/nmh/, nmh}, but you may be interested in -trying out @uref{http://mailutils.org/, GNU mailutils MH}, which +@uref{https://www.nongnu.org/nmh/, nmh}, but you may be interested in +trying out @uref{https://mailutils.org/, GNU mailutils MH}, which supports IMAP@. Your GNU/Linux distribution probably has packages for both of these. @@ -2092,7 +2092,7 @@ This feature will be turned on by default if your system supports it. The first header field used, if present, is the Gnus-specific @samp{Face:} field@footnote{The @samp{Face:} field appeared in GNU Emacs 21 and XEmacs. For more information, see -@uref{http://quimby.gnus.org/circus/face/}.}. +@uref{https://quimby.gnus.org/circus/face/}.}. @cindex @command{uncompface} @cindex Emacs, packages, @samp{x-face} @@ -2100,6 +2100,7 @@ Emacs 21 and XEmacs. For more information, see @cindex @samp{x-face} package @vindex mh-show-xface +@c FIXME: These URLs do not seem to work any more. Next is the traditional @samp{X-Face:} header field@footnote{The display of this field requires the @uref{ftp://ftp.cs.indiana.edu/pub/faces/compface/compface.tar.Z, @@ -2122,7 +2123,7 @@ Finally, MH-E will display images referenced by the @samp{X-Face:} fields are present@footnote{The display of the images requires the @uref{https://www.gnu.org/software/wget/wget.html, @command{wget} program} to fetch the image and the @command{convert} -program from the @uref{http://www.imagemagick.org/script/index.php, +program from the @uref{https://www.imagemagick.org/script/index.php, ImageMagick suite}.}. Of the three header fields this is the most efficient in terms of network usage since the image doesn't need to be transmitted with every single mail. The option @@ -2509,9 +2510,9 @@ For additional information on buttons, see @ref{Article Buttons,,,gnus}, and @ref{MIME Commands,,,gnus}. @end ifinfo @ifnotinfo -the chapters @uref{http://www.gnus.org/manual/gnus_101.html#SEC101, +the chapters @uref{https://www.gnus.org/manual/gnus_101.html#SEC101, Article Buttons} and -@uref{http://www.gnus.org/manual/gnus_108.html#SEC108, MIME Commands} +@uref{https://www.gnus.org/manual/gnus_108.html#SEC108, MIME Commands} in the @cite{The Gnus Manual}. @end ifnotinfo @@ -2603,7 +2604,7 @@ and @code{mm-html-inhibit-images} (@pxref{Display Customization,,,emacs-mime}). @end ifinfo @ifnotinfo -(see section @uref{http://www.gnus.org/manual/emacs-mime_6.html, +(see section @uref{https://www.gnus.org/manual/emacs-mime_6.html, Display Customization} in the @cite{The Emacs MIME Manual}). @end ifnotinfo @c ------------------------- @@ -2623,7 +2624,7 @@ the option @code{mm-w3m-safe-url-regexp} (@pxref{Display Customization,,,emacs-mime}). @end ifinfo @ifnotinfo -(see section @uref{http://www.gnus.org/manual/emacs-mime_6.html, +(see section @uref{https://www.gnus.org/manual/emacs-mime_6.html, Display Customization} in the @cite{The Emacs MIME Manual}). @end ifnotinfo @c ------------------------- @@ -2647,10 +2648,10 @@ For a couple more sources of information about the Gnus command @kbd{W h} (@pxref{Article Washing,,,gnus}). @end ifinfo @ifnotinfo -see section @uref{http://www.gnus.org/manual/emacs-mime_6.html, +see section @uref{https://www.gnus.org/manual/emacs-mime_6.html, Display Customization} in the @cite{The Emacs MIME Manual} and the documentation for the Gnus command @kbd{W h} (see section -@uref{http://www.gnus.org/manual/gnus_48.html#Article-Washing, Article +@uref{https://www.gnus.org/manual/gnus_48.html#Article-Washing, Article Washing} in the @cite{The Gnus Manual}). @end ifnotinfo @@ -2729,7 +2730,7 @@ Drafts}). You can read encrypted or signed PGP or GPG messages with MH-E@footnote{This feature depends on post-5.10 versions of Gnus. @cite{MIME Security with OpenPGP} is documented in -@uref{http://www.rfc-editor.org/rfc/rfc3156.txt, RFC 3156}. However, +@uref{https://www.rfc-editor.org/rfc/rfc3156.txt, RFC 3156}. However, MH-E can also decrypt old-style PGP messages that are not in MIME format.}. This section assumes that you already have a good understanding of GPG and have set up your keys appropriately. @@ -5050,7 +5051,7 @@ for the next hook function. The standard prefix @vindex mh-yank-behavior For example, if you use the hook function -@uref{http://www.emacswiki.org/emacs/TrivialCite, +@uref{https://www.emacswiki.org/emacs/TrivialCite, @code{trivial-cite}} (which is NOT part of Emacs), set @code{mh-yank-behavior} to @samp{Body and Header}. @@ -5166,11 +5167,11 @@ contains the value of the @samp{X-Face:} header field. The @samp{X-Face:} header field, which is a low-resolution, black and white image, can be generated using the @uref{ftp://ftp.cs.indiana.edu/pub/faces/compface/compface.tar.Z, -@command{compface}} command. The @uref{http://www.dairiki.org/xface/, +@command{compface}} command. The @uref{https://www.dairiki.org/xface/, @cite{Online X-Face Converter}} is a useful resource for quick conversion of images into @samp{X-Face:} header fields. -Use the @uref{http://quimby.gnus.org/circus/face/make-face, +Use the @uref{https://quimby.gnus.org/circus/face/make-face, @command{make-face}} script to convert a JPEG image to the higher resolution, color, @samp{Face:} header field. @@ -5198,7 +5199,7 @@ defined by this option doesn't exist. MH-E has the capability to create multimedia messages. It uses the @sc{mime} (Multipurpose Internet Mail Extensions) protocol@footnote{@sc{mime} is defined in -@uref{http://www.rfc-editor.org/rfc/rfc2045.txt, RFC 2045}.} The +@uref{https://www.rfc-editor.org/rfc/rfc2045.txt, RFC 2045}.} The @sc{mime} protocol allows you to incorporate images, sound, video, binary files, and even commands that fetch a file with @samp{ftp} when your recipient reads the message! @@ -5231,7 +5232,7 @@ Meta Language) tags@footnote{ @end ifinfo @ifnotinfo See the section Composing in -@uref{http://www.gnus.org/manual/emacs-mime.html, @cite{The Emacs MIME +@uref{https://www.gnus.org/manual/emacs-mime.html, @cite{The Emacs MIME Manual}}. @end ifnotinfo }. The option @code{mh-compose-insertion} can be used to choose @@ -5537,7 +5538,7 @@ been formatted by @kbd{C-c C-e}. @cindex RFC 3156 MH-E can sign and encrypt messages as defined in -@uref{http://www.rfc-editor.org/rfc/rfc3156.txt, RFC 3156}. If you +@uref{https://www.rfc-editor.org/rfc/rfc3156.txt, RFC 3156}. If you should choose to sign or encrypt your message, use one of the following commands to do so any time before sending your message. @@ -6909,7 +6910,7 @@ IndexDir /home/user/Mail IndexFile /home/user/Mail/.swish/index IndexName "Mail Index" IndexDescription "Mail Index" -IndexPointer "http://nowhere" +IndexPointer "https://nowhere" IndexAdmin "nobody" #MetaNames automatic IndexReport 3 @@ -7630,7 +7631,7 @@ Whitelisted message face @cindex spam filters, SpamAssassin @cindex spam filters, bogofilter -MH-E depends on @uref{http://spamassassin.apache.org/, SpamAssassin}, +MH-E depends on @uref{https://spamassassin.apache.org/, SpamAssassin}, @uref{http://bogofilter.sourceforge.net/, bogofilter}, or @uref{http://spamprobe.sourceforge.net/, SpamProbe} to throw the dreck away. This chapter describes briefly how to configure these programs @@ -7705,7 +7706,7 @@ MH-E can work with. SpamAssassin is one of the more popular spam filtering programs. Get it from your local distribution or from the -@uref{http://spamassassin.apache.org/, SpamAssassin web site}. +@uref{https://spamassassin.apache.org/, SpamAssassin web site}. To use SpamAssassin, add the following recipes to @file{~/.procmailrc}: @@ -8530,11 +8531,13 @@ expressions to ensure that MH-E and highlighting perform well. @cindex Unix commands, @command{procmail} @cindex mailing lists, reading -This appendix explains how to use @uref{http://www.procmail.org/, -procmail} to file mail from mailing lists into folders which can then +This appendix explains how to use procmail, which can +file mail from mailing lists into folders which can then be read easily with MH-E@footnote{The MH equivalent, @command{slocal}, -can be used as well, but procmail is more flexible and more packages -exist for procmail than for slocal.}. Some mailing lists have such +can be used as well, but procmail was more flexible and more packages +exist for procmail than for slocal.}. Unfortunately, procmail is no +longer recommended due to its security vulnerabilities. +Some mailing lists have such high traffic that Gnus must be used and I discuss how to use Gnus side-by-side with MH-E. @@ -8764,7 +8767,7 @@ in all new releases). @cindex Debian If you use Debian, you can install the Debian -@uref{http://packages.debian.org/unstable/mail/mh-e, mh-e package} +@uref{https://packages.debian.org/unstable/mail/mh-e, mh-e package} instead. @cindex files, @samp{MH-E-NEWS} @@ -8813,7 +8816,7 @@ hands several times since then. Jim Larus wanted to do something similar for GNU Emacs, and ended up completely rewriting it that same year. In 1989, Stephen Gildea picked it up and added many improvements. Bill Wohler then took over in 2000 and moved its -development to @uref{http://sourceforge.net/, SourceForge} where it +development to @uref{https://sourceforge.net/, SourceForge} where it lives today. @menu @@ -9040,8 +9043,8 @@ Bill Wohler, August 2008 @c LocalWords: Tennex texi texinfo Thelen thelenm @c LocalWords: UCI undeleted whatnow wohler xmh ypcat @c -@c See http://www.oreilly.com/oreilly/author/stylesheet.html. -@c See http://en.wikipedia.org/. +@c See https://oreillymedia.github.io/production-resources/styleguide/. +@c See https://en.wikipedia.org/. @c @c Note the lowercase mh which is needed to avoid hits in the @c functions and variables. Occasionally, check for accidental diff --git a/doc/misc/newsticker.texi b/doc/misc/newsticker.texi index 5db3f43b2b..502ed1d5b1 100644 --- a/doc/misc/newsticker.texi +++ b/doc/misc/newsticker.texi @@ -39,7 +39,6 @@ modify this GNU manual.'' @title Newsticker---a feed reader for Emacs @author Ulf Jasper @author @email{ulf.jasper@@web.de} -@author @uref{http://ulf.epplejasper.de/} @page @vskip 0pt plus 1filll @insertcopying @@ -590,8 +589,8 @@ Newsticker works with the standard RSS and Atom formats listed below @itemize @item RSS 0.91 (see @uref{http://backend.userland.com/rss091}) @item RSS 0.92 (see @uref{http://backend.userland.com/rss092}) -@item RSS 1.0 (see @uref{http://purl.org/rss/1.0/spec}) -@item RSS 2.0 (see @uref{http://blogs.law.harvard.edu/tech/rss}) +@item RSS 1.0 (see @uref{http://web.resource.org/rss/1.0/spec}) +@item RSS 2.0 (see @uref{https://cyber.harvard.edu/rss/rss.html}) @end itemize @subheading Atom formats diff --git a/doc/misc/org.texi b/doc/misc/org.texi index de3b7bbed4..adb795e1e6 100644 --- a/doc/misc/org.texi +++ b/doc/misc/org.texi @@ -3527,7 +3527,7 @@ string followed by a colon. There can be no space after the colon. The following list shows examples for each link type. @example -http://www.astro.uva.nl/~dominik @r{on the web} +https://api.uva.nl/ @r{on the web} doi:10.1000/182 @r{DOI for an electronic resource} file:/home/dominik/images/jupiter.jpg @r{file, absolute path} /home/dominik/images/jupiter.jpg @r{same as above} diff --git a/doc/misc/url.texi b/doc/misc/url.texi index bad7701daf..e72d9bfe3d 100644 --- a/doc/misc/url.texi +++ b/doc/misc/url.texi @@ -440,8 +440,7 @@ Specifies whether confirmation is required to accept cookies. @defopt url-cookie-multiple-line Specifies whether to put all cookies for the server on one line in the -HTTP request to satisfy broken servers like -@url{http://www.hotmail.com}. +HTTP request to satisfy broken servers. @end defopt @defopt url-cookie-trusted-urls diff --git a/doc/misc/wisent.texi b/doc/misc/wisent.texi index b404c2a82d..2cf3b2e2fc 100644 --- a/doc/misc/wisent.texi +++ b/doc/misc/wisent.texi @@ -135,7 +135,7 @@ technique of F. DeRemer and T. Pennello described in: @quotation @cite{Efficient Computation of LALR(1) Look-Ahead Sets}@* October 1982, ACM TOPLAS Vol 4 No 4, 615--49, -@uref{http://dx.doi.org/10.1145/69622.357187}. +@uref{https://doi.org/10.1145/69622.357187}. @end quotation @item diff --git a/etc/MH-E-NEWS b/etc/MH-E-NEWS index def0af1588..978358b580 100644 --- a/etc/MH-E-NEWS +++ b/etc/MH-E-NEWS @@ -2362,9 +2362,9 @@ header if it doesn't already exist and "~/.face" is present. See the new customization variables `mh-show-use-xface-flag' and `mh-x-face-file' (closes SF #480770). -MH-E depends on the external x-face package found in +MH-E depends on the external x-face package formerly found in http://www.jpl.org/pub/elisp/ to do this. The `uncompface' binary is -also required to be in the execute PATH. It can be obtained from: +also required to be in the execute PATH. It was formerly obtainable from: http://freshmeat.net/redir/compface/1439/url_tgz/compface-1.4.tar.gz. It has also been observed that if you don't see the faces, you might @@ -2684,7 +2684,7 @@ mh-quit now cleans up the buffers named `mh-temp-buffer,' * Changes in mh-e 6.0 mh-e is now maintained at SourceForge (see -http://mh-e.sourceforge.net/). This is where you need to go to obtain +https://mh-e.sourceforge.io/). This is where you need to go to obtain new versions of mh-e, report bugs and receive support. The maintainers have moved much of their personal configurations into diff --git a/etc/NEWS.23 b/etc/NEWS.23 index bbc81d2889..e18a7abce2 100644 --- a/etc/NEWS.23 +++ b/etc/NEWS.23 @@ -815,7 +815,7 @@ remote display. There are some bugs for Gtk+. See etc/PROBLEMS. *** Emacs now supports the XEmbed specification. You can embed Emacs in another application on X11. The new command line option --parent-id is used to pass the parent window id to Emacs. See -http://standards.freedesktop.org/xembed-spec/xembed-spec-latest.html +https://specifications.freedesktop.org/xembed-spec/xembed-spec-latest.html for details about XEmbed. *** Emacs can now set the frame opacity. diff --git a/etc/PROBLEMS b/etc/PROBLEMS index 2d56cc761a..c0d30ae5b4 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -298,7 +298,7 @@ you launched Emacs: This problem occurs because unfortunately there are two libraries called "libotf". One is the library for handling OpenType fonts, -http://www.m17n.org/libotf/, which is the one that Emacs expects. +https://www.nongnu.org/m17n/, which is the one that Emacs expects. The other is a library for Open Trace Format, and is used by some versions of the MPI message passing interface for parallel programming. diff --git a/etc/TODO b/etc/TODO index ac47b0ad2b..67de79f8a9 100644 --- a/etc/TODO +++ b/etc/TODO @@ -720,7 +720,7 @@ Anders Lindgren has implemented running Emacs as root. See this article by Bozhidar Batsov for an overview of Proced: -http://emacsredux.com/blog/2013/05/02/manage-processes-with-proced/ +https://emacsredux.com/blog/2013/05/02/manage-processes-with-proced/ **** Tooltip properties diff --git a/lib-src/make-fingerprint.c b/lib-src/make-fingerprint.c index 2417548d8c..0e26c5353b 100644 --- a/lib-src/make-fingerprint.c +++ b/lib-src/make-fingerprint.c @@ -16,7 +16,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with GNU Emacs. If not, see . */ +along with GNU Emacs. If not, see . */ /* The arguments given to this program are all the object files that diff --git a/lib/fingerprint.c b/lib/fingerprint.c index 2cc1973428..015ca710cc 100644 --- a/lib/fingerprint.c +++ b/lib/fingerprint.c @@ -15,7 +15,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with GNU Emacs. If not, see . */ +along with GNU Emacs. If not, see . */ #include diff --git a/lib/fingerprint.h b/lib/fingerprint.h index 7d2160c988..333c743d63 100644 --- a/lib/fingerprint.h +++ b/lib/fingerprint.h @@ -15,7 +15,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with GNU Emacs. If not, see . */ +along with GNU Emacs. If not, see . */ #ifndef EMACS_FINGERPRINT_H #define EMACS_FINGERPRINT_H diff --git a/lisp/cedet/pulse.el b/lisp/cedet/pulse.el index bd3687ab55..7aaca833ca 100644 --- a/lisp/cedet/pulse.el +++ b/lisp/cedet/pulse.el @@ -100,7 +100,7 @@ left. So, for example, INT=256 and NB-DIGITS=2 returns \"00\", since the hex equivalent of 256 decimal is 100, which is more than 2 digits. This function was blindly copied from hexrgb.el by Drew Adams. -http://www.emacswiki.org/cgi-bin/wiki/hexrgb.el" +https://www.emacswiki.org/emacs/hexrgb.el" (setq nb-digits (or nb-digits 4)) (substring (format (concat "%0" (int-to-string nb-digits) "X") int) (- nb-digits))) @@ -110,7 +110,7 @@ Each X in the string is a hexadecimal digit. Input VALUES is as for the output of `x-color-values'. This function was blindly copied from hexrgb.el by Drew Adams. -http://www.emacswiki.org/cgi-bin/wiki/hexrgb.el" +https://www.emacswiki.org/emacs/hexrgb.el" (concat "#" (pulse-int-to-hex (nth 0 values) 4) ; red (pulse-int-to-hex (nth 1 values) 4) ; green diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index b40379c4f5..915125b655 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el @@ -2297,6 +2297,7 @@ Return the name of the group if selection was successful." (message "Quit reading the ephemeral group")) nil))))) +;; FIXME: This URL no longer works. (defcustom gnus-gmane-group-download-format "http://download.gmane.org/%s/%s/%s" "URL for downloading mbox files. diff --git a/lisp/net/dbus.el b/lisp/net/dbus.el index 3820cd49f2..c3297ac9da 100644 --- a/lisp/net/dbus.el +++ b/lisp/net/dbus.el @@ -24,7 +24,7 @@ ;; This package provides language bindings for the D-Bus API. D-Bus ;; is a message bus system, a simple way for applications to talk to -;; one another. See for details. +;; one another. See for details. ;; Low-level language bindings are implemented in src/dbusbind.c. @@ -72,7 +72,7 @@ (defconst dbus-interface-peer (concat dbus-interface-dbus ".Peer") "The interface for peer objects. -See URL `http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-peer'.") +See URL `https://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-peer'.") ;; ;; @@ -85,7 +85,7 @@ See URL `http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interf (defconst dbus-interface-introspectable (concat dbus-interface-dbus ".Introspectable") "The interface supported by introspectable objects. -See URL `http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-introspectable'.") +See URL `https://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-introspectable'.") ;; ;; @@ -95,7 +95,7 @@ See URL `http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interf (defconst dbus-interface-properties (concat dbus-interface-dbus ".Properties") "The interface for property objects. -See URL `http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-properties'.") +See URL `https://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-properties'.") ;; ;; @@ -122,7 +122,7 @@ See URL `http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interf (defconst dbus-interface-objectmanager (concat dbus-interface-dbus ".ObjectManager") "The object manager interface. -See URL `http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager'.") +See URL `https://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager'.") ;; ;; diff --git a/lisp/net/newst-backend.el b/lisp/net/newst-backend.el index 1fb7fe005e..9c24dec2a1 100644 --- a/lisp/net/newst-backend.el +++ b/lisp/net/newst-backend.el @@ -167,8 +167,8 @@ value effective." nil 3600)) "A customizable list of news feeds to select from. -These were mostly extracted from the Radio Community Server at -http://subhonker6.userland.com/rcsPublic/rssHotlist. +These were mostly extracted from the Radio Community Server +. You may add other entries in `newsticker-url-list'." :type `(set ,@(mapcar #'newsticker--splicer diff --git a/lisp/net/soap-client.el b/lisp/net/soap-client.el index 3f9eb5cb89..956e2cf4c4 100644 --- a/lisp/net/soap-client.el +++ b/lisp/net/soap-client.el @@ -3027,7 +3027,7 @@ SERVICE-URL should be provided when WS-Addressing is being used." (insert "\n. VHDL Mode is officially distributed at -http://www.iis.ee.ethz.ch/~zimmi/emacs/vhdl-mode.html +https://guest.iis.ee.ethz.ch/~zimmi/emacs/vhdl-mode.html where the latest version can be found. diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el index 5ae8097891..7e99032084 100644 --- a/lisp/textmodes/bibtex.el +++ b/lisp/textmodes/bibtex.el @@ -1243,7 +1243,7 @@ Used by `bibtex-complete-crossref-cleanup' and `bibtex-copy-summary-as-kill'." (defcustom bibtex-generate-url-list '((("url" . ".*:.*")) (("doi" . "10\\.[0-9]+/.+") - "http://dx.doi.org/%s" + "https://doi.org/%s" ("doi" ".*" 0))) "List of schemes for generating the URL of a BibTeX entry. These schemes are used by `bibtex-url'. diff --git a/lisp/url/url-vars.el b/lisp/url/url-vars.el index 134404c998..0f9b1b6f44 100644 --- a/lisp/url/url-vars.el +++ b/lisp/url/url-vars.el @@ -327,7 +327,7 @@ a terminal with a slow modem." (defvar url-using-proxy nil "Either nil or the fully qualified proxy URL in use, e.g. -http://www.example.com/") +https://www.example.com/") (defcustom url-news-server nil "The default news server from which to get newsgroups/articles. diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el index b53174b7bd..9e8a32a28f 100644 --- a/lisp/xt-mouse.el +++ b/lisp/xt-mouse.el @@ -50,7 +50,7 @@ "Read a click and release event from XTerm. Similar to `xterm-mouse-translate', but using the \"1006\" extension, which supports coordinates >= 231 (see -http://invisible-island.net/xterm/ctlseqs/ctlseqs.html)." +https://invisible-island.net/xterm/ctlseqs/ctlseqs.html)." (xterm-mouse-translate-1 1006)) (defun xterm-mouse-translate-1 (&optional extension) diff --git a/src/.gdbinit b/src/.gdbinit index e9ba5267ec..eb767f2dcb 100644 --- a/src/.gdbinit +++ b/src/.gdbinit @@ -1314,7 +1314,7 @@ if hasattr(gdb, 'printing'): # simpler and works regardless of whether VAL is a pointer or # integer. Also, val.cast (gdb.lookup.type ("EMACS_UINT")) # would have problems with GDB 7.12.1; see - # . + # ival = long (val) # For nil, yield "XIL(0)", which is easier to read than "XIL(0x0)". diff --git a/src/character.c b/src/character.c index d14d0df29f..a80e6f8de0 100644 --- a/src/character.c +++ b/src/character.c @@ -1045,7 +1045,7 @@ printablep (int c) } /* Return true if C is a horizontal whitespace character, as defined - by http://www.unicode.org/reports/tr18/tr18-19.html#blank. */ + by https://www.unicode.org/reports/tr18/tr18-19.html#blank. */ bool blankp (int c) { diff --git a/src/coding.c b/src/coding.c index c0408fbce4..21e6dc4c19 100644 --- a/src/coding.c +++ b/src/coding.c @@ -2678,7 +2678,7 @@ encode_coding_emacs_mule (struct coding_system *coding) functions in this file, some parts are NOT ACCURATE or are OVERLY SIMPLIFIED. For thorough understanding, please refer to the original document of ISO2022. This is equivalent to the standard - ECMA-35, obtainable from (*). + ECMA-35, obtainable from (*). ISO2022 provides many mechanisms to encode several character sets in 7-bit and 8-bit environments. For 7-bit environments, all text diff --git a/src/emacs.c b/src/emacs.c index 8a8d8b558e..21a05d337e 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -159,11 +159,7 @@ static uintmax_t heap_bss_diff; On Cocoa, CoreFoundation lib fails in forked process, see Mac OS X Leopard Developer Release Notes for CoreFoundation Framework: - http://developer.apple.com/ReleaseNotes/ - CoreFoundation/CoreFoundation.html - - Note: the above is no longer available on-line, but it can be found - via the "Wayback machine", https://web.archive.org. + https://web.archive.org/web/20090225231934/http://developer.apple.com/ReleaseNotes/CoreFoundation/CoreFoundation.html On Windows, a Cygwin fork child cannot access the USER subsystem. diff --git a/src/fileio.c b/src/fileio.c index b510d48dba..45186d6940 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -6151,7 +6151,7 @@ init_fileio (void) For more on why fsync often fails to work on today's hardware, see: Zheng M et al. Understanding the robustness of SSDs under power fault. 11th USENIX Conf. on File and Storage Technologies, 2013 (FAST '13), 271-84 - http://www.usenix.org/system/files/conference/fast13/fast13-final80.pdf + https://www.usenix.org/system/files/conference/fast13/fast13-final80.pdf For more on why fsync does not suffice even if it works properly, see: Roche X. Necessary step(s) to synchronize filename operations on disk. diff --git a/src/image.c b/src/image.c index 5183558029..d9b7101d65 100644 --- a/src/image.c +++ b/src/image.c @@ -8294,7 +8294,7 @@ gif_load (struct frame *f, struct image *img) /* For disposal == 0, the spec says "No disposal specified. The decoder is not required to take any action." In practice, it seems we need to treat this like "keep in place", see e.g. - http://upload.wikimedia.org/wikipedia/commons/3/37/Clock.gif */ + https://upload.wikimedia.org/wikipedia/commons/3/37/Clock.gif */ if (disposal == 0) disposal = 1; @@ -9196,7 +9196,7 @@ DEFUN ("imagemagick-types", Fimagemagick_types, Simagemagick_types, 0, 0, 0, doc: /* Return a list of image types supported by ImageMagick. Each entry in this list is a symbol named after an ImageMagick format tag. See the ImageMagick manual for a list of ImageMagick formats and -their descriptions (http://www.imagemagick.org/script/formats.php). +their descriptions (https://www.imagemagick.org/script/formats.php). You can also try the shell command: `identify -list format'. Note that ImageMagick recognizes many file-types that Emacs does not diff --git a/src/lcms.c b/src/lcms.c index cd8de0e45a..01ce886f40 100644 --- a/src/lcms.c +++ b/src/lcms.c @@ -108,7 +108,7 @@ parse_lab_list (Lisp_Object lab_list, cmsCIELab *color) return true; } -/* http://www.ece.rochester.edu/~gsharma/ciede2000/ciede2000noteCRNA.pdf> */ +/* http://www.ece.rochester.edu/~gsharma/ciede2000/ciede2000noteCRNA.pdf */ DEFUN ("lcms-cie-de2000", Flcms_cie_de2000, Slcms_cie_de2000, 2, 5, 0, doc: /* Compute CIEDE2000 metric distance between COLOR1 and COLOR2. diff --git a/src/lisp.h b/src/lisp.h index e68d2732e2..bcb91b2dec 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -5026,7 +5026,7 @@ struct for_each_tail_internal Use Brent’s teleporting tortoise-hare algorithm. See: Brent RP. BIT. 1980;20(2):176-84. doi:10.1007/BF01933190 - http://maths-people.anu.edu.au/~brent/pd/rpb051i.pdf + https://maths-people.anu.edu.au/~brent/pd/rpb051i.pdf This macro uses maybe_quit because of an excess of caution. The call to maybe_quit should not be needed in practice, as a very long diff --git a/src/nsfont.m b/src/nsfont.m index 7a40d672b5..dc609cc5d0 100644 --- a/src/nsfont.m +++ b/src/nsfont.m @@ -722,7 +722,7 @@ when setting family in ns_spec_to_descriptor(). */ if (fabs (ns_attribute_fvalue (fontDesc, NSFontSlantTrait) > 0.05F)) traits |= NSItalicFontMask; - /* see http://cocoadev.com/forums/comments.php?DiscussionID=74 */ + /* see https://web.archive.org/web/20100201175731/http://cocoadev.com/forums/comments.php?DiscussionID=74 */ fixLeopardBug = traits & NSBoldFontMask ? 10 : 5; nsfont = [fontMgr fontWithFamily: family traits: traits weight: fixLeopardBug diff --git a/src/pdumper.h b/src/pdumper.h index 31b0d53b07..b07f017697 100644 --- a/src/pdumper.h +++ b/src/pdumper.h @@ -15,7 +15,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with GNU Emacs. If not, see . */ +along with GNU Emacs. If not, see . */ #ifndef EMACS_PDUMPER_H #define EMACS_PDUMPER_H diff --git a/src/process.c b/src/process.c index d30b17d45e..e53d5d8894 100644 --- a/src/process.c +++ b/src/process.c @@ -5547,8 +5547,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, through all the channels and check for data. This is a workaround needed for some versions of the gnutls library -- 2.12.14 has been confirmed - to need it. See - http://comments.gmane.org/gmane.emacs.devel/145074 */ + to need it. */ for (channel = 0; channel < FD_SETSIZE; ++channel) if (! NILP (chan_process[channel])) { diff --git a/src/widget.c b/src/widget.c index c3d396ddab..e8eaf0fadf 100644 --- a/src/widget.c +++ b/src/widget.c @@ -21,12 +21,7 @@ along with GNU Emacs. If not, see . */ /* This file has been censored by the Communications Decency Act. That law was passed under the guise of a ban on pornography, but it bans far more than that. This file did not contain pornography, - but it was censored nonetheless. - - For information on US government censorship of the Internet, and - what you can do to bring back freedom of the press, see the web - site http://www.vtw.org/ - */ + but it was censored nonetheless. */ #include #include "widget.h" diff --git a/src/window.c b/src/window.c index 9a0a9a115c..321b3e01b7 100644 --- a/src/window.c +++ b/src/window.c @@ -6350,8 +6350,8 @@ and redisplay normally--don't erase and redraw the frame. */) int this_scroll_margin; /* For reasons why we signal an error here, see - http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00053.html, - http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00094.html. */ + https://lists.gnu.org/r/emacs-devel/2014-06/msg00053.html, + https://lists.gnu.org/r/emacs-devel/2014-06/msg00094.html. */ if (buf != current_buffer) error ("`recenter'ing a window that does not display current-buffer."); diff --git a/src/xfaces.c b/src/xfaces.c index c3cae7e2a6..946401b9e9 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -4177,7 +4177,7 @@ color_distance (Emacs_Color *x, Emacs_Color *y) algorithm: it does not have a range of colors where it suddenly gives far from optimal results. - See for more info. */ + See for more info. */ long r = (x->red - y->red) >> 8; long g = (x->green - y->green) >> 8; diff --git a/src/xselect.c b/src/xselect.c index d74f064a1c..6bb35607a5 100644 --- a/src/xselect.c +++ b/src/xselect.c @@ -2137,7 +2137,7 @@ On Nextstep, TERMINAL is unused. */) /* Send clipboard manager a SAVE_TARGETS request with a UTF8_STRING - property (http://www.freedesktop.org/wiki/ClipboardManager). */ + property (https://www.freedesktop.org/wiki/ClipboardManager/). */ static Lisp_Object x_clipboard_manager_save (Lisp_Object frame) diff --git a/src/xsettings.c b/src/xsettings.c index 06c47c6c6c..c23a5dc72c 100644 --- a/src/xsettings.c +++ b/src/xsettings.c @@ -343,8 +343,8 @@ get_prop_window (struct x_display_info *dpyinfo) #define PAD(nr) (((nr) + 3) & ~3) /* Parse xsettings and extract those that deal with Xft. - See http://freedesktop.org/wiki/Specifications/XSettingsRegistry - and http://standards.freedesktop.org/xsettings-spec/xsettings-spec-0.5.html. + See https://freedesktop.org/wiki/Specifications/XSettingsRegistry/ + and https://specifications.freedesktop.org/xsettings-spec/xsettings-spec-0.5.html. Layout of prop. First is a header: diff --git a/src/xterm.c b/src/xterm.c index 27d9800356..255b6c62d5 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -10599,7 +10599,7 @@ x_set_offset (struct frame *f, register int xoff, register int yoff, int change_ on the root window for frame F contains ATOMNAME. This is how a WM check shall be done according to the Window Manager Specification/Extended Window Manager Hints at - http://freedesktop.org/wiki/Specifications/wm-spec. */ + https://freedesktop.org/wiki/Specifications/wm-spec/. */ bool x_wm_supports (struct frame *f, Atom want_atom) @@ -11524,7 +11524,7 @@ static void xembed_request_focus (struct frame *f) { /* See XEmbed Protocol Specification at - http://freedesktop.org/wiki/Specifications/xembed-spec */ + https://freedesktop.org/wiki/Specifications/xembed-spec/ */ if (FRAME_VISIBLE_P (f)) xembed_send_message (f, CurrentTime, XEMBED_REQUEST_FOCUS, 0, 0, 0); @@ -11536,7 +11536,7 @@ static void x_ewmh_activate_frame (struct frame *f) { /* See Window Manager Specification/Extended Window Manager Hints at - http://freedesktop.org/wiki/Specifications/wm-spec */ + https://freedesktop.org/wiki/Specifications/wm-spec/ */ struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); @@ -11586,7 +11586,7 @@ x_focus_frame (struct frame *f, bool noactivate) { /* For Xembedded frames, normally the embedder forwards key events. See XEmbed Protocol Specification at - http://freedesktop.org/wiki/Specifications/xembed-spec */ + https://freedesktop.org/wiki/Specifications/xembed-spec/ */ xembed_request_focus (f); } else diff --git a/test/lisp/emacs-lisp/cl-preloaded-tests.el b/test/lisp/emacs-lisp/cl-preloaded-tests.el index 3251b5ff0a..c1a6d5d272 100644 --- a/test/lisp/emacs-lisp/cl-preloaded-tests.el +++ b/test/lisp/emacs-lisp/cl-preloaded-tests.el @@ -16,7 +16,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . +;; along with this program. If not, see . ;;; Commentary: diff --git a/test/manual/biditest.el b/test/manual/biditest.el index d813642f78..81b9fd2db1 100644 --- a/test/manual/biditest.el +++ b/test/manual/biditest.el @@ -34,7 +34,7 @@ INPUT-FILE should be in the format of the BidiCharacterTest.txt file available from the Unicode site, as part of the UCD database, see -http://www.unicode.org/Public/UCD/latest/ucd/BidiCharacterTest.txt. +https://www.unicode.org/Public/UCD/latest/ucd/BidiCharacterTest.txt. The resulting file should be viewed with `inhibit-bidi-mirroring' set to t." (let ((output-buf (get-buffer-create "*biditest-output*")) commit 78669517dc3db4d6d51fb26d71073fc0c196ab5d Author: Paul Eggert Date: Sun Sep 22 23:50:59 2019 -0700 Update from Gnulib This incorporates: 2019-09-22 Update some URLs 2019-09-15 fcntl-h: fix compilation error of creat.c on MSVC 2019-09-15 creat: new module 2019-09-15 access: new module 2019-09-09 Add option to assume best, not worst, when cross-compiling. * build-aux/config.guess, build-aux/config.sub, doc/misc/texinfo.tex: * lib/careadlinkat.c, lib/careadlinkat.h, lib/count-leading-zeros.h: * lib/count-trailing-zeros.h, lib/diffseq.h, lib/fcntl.in.h: * lib/ftoastr.c, lib/get-permissions.c: * lib/ieee754.in.h, lib/inttypes.in.h, lib/mktime.c, lib/open.c: * lib/pathmax.h, lib/pipe2.c, lib/stddef.in.h, lib/stdint.in.h: * lib/stdlib.in.h, lib/str-two-way.h, lib/string.in.h, lib/time.in.h: * lib/timegm.c, lib/unistd.in.h, m4/canonicalize.m4: * m4/extern-inline.m4, m4/fcntl_h.m4, m4/fdopendir.m4: * m4/getgroups.m4, m4/getopt.m4, m4/gettimeofday.m4: * m4/gnulib-common.m4, m4/largefile.m4: * m4/lstat.m4, m4/memmem.m4, m4/mktime.m4, m4/nocrash.m4, m4/open.m4: * m4/pselect.m4, m4/putenv.m4, m4/readlink.m4, m4/regex.m4: * m4/symlink.m4, m4/unistd_h.m4, m4/utimens.m4, m4/utimes.m4: Copy from Gnulib. * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate. * m4/open-slash.m4: New file, copied from Gnulib. diff --git a/build-aux/config.guess b/build-aux/config.guess index 97ad073330..7f9ebbe310 100755 --- a/build-aux/config.guess +++ b/build-aux/config.guess @@ -2,7 +2,7 @@ # Attempt to guess a canonical system name. # Copyright 1992-2019 Free Software Foundation, Inc. -timestamp='2019-07-24' +timestamp='2019-09-10' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -274,6 +274,9 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in *:Sortix:*:*) echo "$UNAME_MACHINE"-unknown-sortix exit ;; + *:Twizzler:*:*) + echo "$UNAME_MACHINE"-unknown-twizzler + exit ;; *:Redox:*:*) echo "$UNAME_MACHINE"-unknown-redox exit ;; diff --git a/build-aux/config.sub b/build-aux/config.sub index a318a46868..0f2234c174 100755 --- a/build-aux/config.sub +++ b/build-aux/config.sub @@ -1343,7 +1343,7 @@ case $os in | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ | sym* | kopensolaris* | plan9* \ | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ - | aos* | aros* | cloudabi* | sortix* \ + | aos* | aros* | cloudabi* | sortix* | twizzler* \ | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \ | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \ | knetbsd* | mirbsd* | netbsd* \ diff --git a/doc/misc/texinfo.tex b/doc/misc/texinfo.tex index d2e895f362..df43c1e26e 100644 --- a/doc/misc/texinfo.tex +++ b/doc/misc/texinfo.tex @@ -3,7 +3,7 @@ % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{2019-08-18.20} +\def\texinfoversion{2019-09-20.22} % % Copyright 1985, 1986, 1988, 1990-2019 Free Software Foundation, Inc. % @@ -1052,7 +1052,7 @@ tex.sprint( string.format(string.char(0x5c) .. string.char(0x25) .. '03o' .. string.char(0x5c) .. string.char(0x25) .. '03o', - (c / 256), (c % 256))) + math.floor(c / 256), math.floor(c % 256))) else c = c - 0x10000 local c_hi = c / 1024 + 0xd800 @@ -1062,8 +1062,8 @@ string.char(0x5c) .. string.char(0x25) .. '03o' .. string.char(0x5c) .. string.char(0x25) .. '03o' .. string.char(0x5c) .. string.char(0x25) .. '03o', - (c_hi / 256), (c_hi % 256), - (c_lo / 256), (c_lo % 256))) + math.floor(c_hi / 256), math.floor(c_hi % 256), + math.floor(c_lo / 256), math.floor(c_lo % 256))) end end end @@ -1076,15 +1076,19 @@ function PDFescstr(str) for c in string.bytes(str) do if c <= 0x20 or c >= 0x80 or c == 0x28 or c == 0x29 or c == 0x5c then - tex.sprint( + tex.sprint(-2, string.format(string.char(0x5c) .. string.char(0x25) .. '03o', c)) else - tex.sprint(string.char(c)) + tex.sprint(-2, string.char(c)) end end end } + % The -2 in the arguments here gives all the input to TeX catcode 12 + % (other) or 10 (space), preventing undefined control sequence errors. See + % https://lists.gnu.org/archive/html/bug-texinfo/2019-08/msg00031.html + % \endgroup \def\pdfescapestring#1{\directlua{PDFescstr('\luaescapestring{#1}')}} \ifnum\luatexversion>84 @@ -4843,6 +4847,7 @@ \definedummyletter\ % \definedummyletter\{% \definedummyletter\}% + \definedummyletter\&% % % Do the redefinitions. \definedummies @@ -4913,6 +4918,7 @@ \definedummyword\TeX % % Assorted special characters. + \definedummyword\ampchar \definedummyword\atchar \definedummyword\arrow \definedummyword\backslashchar diff --git a/lib/careadlinkat.c b/lib/careadlinkat.c index e56d503085..480326577c 100644 --- a/lib/careadlinkat.c +++ b/lib/careadlinkat.c @@ -54,7 +54,7 @@ The PREADLINKAT function specifies how to read links. It operates like POSIX readlinkat() - + but can assume that its first argument is the same as FD. If successful, return the buffer address; otherwise return NULL and diff --git a/lib/careadlinkat.h b/lib/careadlinkat.h index 68b69aa889..3c08fd6d10 100644 --- a/lib/careadlinkat.h +++ b/lib/careadlinkat.h @@ -40,7 +40,7 @@ struct allocator; The PREADLINKAT function specifies how to read links. It operates like POSIX readlinkat() - + but can assume that its first argument is the same as FD. If successful, return the buffer address; otherwise return NULL and diff --git a/lib/count-leading-zeros.h b/lib/count-leading-zeros.h index e5ac2e1260..cf867acc53 100644 --- a/lib/count-leading-zeros.h +++ b/lib/count-leading-zeros.h @@ -71,7 +71,7 @@ COUNT_LEADING_ZEROS_INLINE int count_leading_zeros_32 (unsigned int x) { /* - */ + */ static const char de_Bruijn_lookup[32] = { 31, 22, 30, 21, 18, 10, 29, 2, 20, 17, 15, 13, 9, 6, 28, 1, 23, 19, 11, 3, 16, 14, 7, 24, 12, 4, 8, 25, 5, 26, 27, 0 diff --git a/lib/count-trailing-zeros.h b/lib/count-trailing-zeros.h index 3f78696e30..7988e4bff4 100644 --- a/lib/count-trailing-zeros.h +++ b/lib/count-trailing-zeros.h @@ -69,7 +69,7 @@ COUNT_TRAILING_ZEROS_INLINE int count_trailing_zeros_32 (unsigned int x) { /* - */ + */ static const char de_Bruijn_lookup[32] = { 0, 1, 28, 2, 29, 14, 24, 3, 30, 22, 20, 15, 25, 17, 4, 8, 31, 27, 13, 23, 21, 19, 16, 7, 26, 12, 18, 6, 11, 5, 10, 9 diff --git a/lib/diffseq.h b/lib/diffseq.h index c6aac3d812..c48da0c98d 100644 --- a/lib/diffseq.h +++ b/lib/diffseq.h @@ -28,13 +28,13 @@ The basic algorithm is described in: "An O(ND) Difference Algorithm and its Variations", Eugene W. Myers, Algorithmica Vol. 1, 1986, pp. 251-266, - . + . See especially section 4.2, which describes the variation used below. The basic algorithm was independently discovered as described in: "Algorithms for Approximate String Matching", Esko Ukkonen, Information and Control Vol. 64, 1985, pp. 100-118, - . + . Unless the 'find_minimal' flag is set, this code uses the TOO_EXPENSIVE heuristic, by Paul Eggert, to limit the cost to O(N**1.5 log N) diff --git a/lib/fcntl.in.h b/lib/fcntl.in.h index eb70dc61ec..abe7993e21 100644 --- a/lib/fcntl.in.h +++ b/lib/fcntl.in.h @@ -39,6 +39,12 @@ #endif #@INCLUDE_NEXT@ @NEXT_FCNTL_H@ +/* Native Windows platforms declare open(), creat() in . */ +#if (@GNULIB_CREAT@ || @GNULIB_OPEN@ || defined GNULIB_POSIXCHECK) \ + && (defined _WIN32 && ! defined __CYGWIN__) +# include +#endif + #else /* Normal invocation convention. */ @@ -59,6 +65,12 @@ /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_FCNTL_H@ +/* Native Windows platforms declare open(), creat() in . */ +#if (@GNULIB_CREAT@ || @GNULIB_OPEN@ || defined GNULIB_POSIXCHECK) \ + && (defined _WIN32 && ! defined __CYGWIN__) +# include +#endif + #ifndef _@GUARD_PREFIX@_FCNTL_H #define _@GUARD_PREFIX@_FCNTL_H @@ -66,12 +78,6 @@ # include #endif -/* Native Windows platforms declare open(), creat() in . */ -#if (@GNULIB_OPEN@ || defined GNULIB_POSIXCHECK) \ - && (defined _WIN32 && ! defined __CYGWIN__) -# include -#endif - /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ @@ -82,6 +88,26 @@ /* Declare overridden functions. */ +#if @GNULIB_CREAT@ +# if @REPLACE_CREAT@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef creat +# define creat rpl_creat +# endif +_GL_FUNCDECL_RPL (creat, int, (const char *filename, mode_t mode) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (creat, int, (const char *filename, mode_t mode)); +# else +_GL_CXXALIAS_SYS (creat, int, (const char *filename, mode_t mode)); +# endif +_GL_CXXALIASWARN (creat); +#elif defined GNULIB_POSIXCHECK +# undef creat +/* Assume creat is always declared. */ +_GL_WARN_ON_USE (creat, "creat is not always POSIX compliant - " + "use gnulib module creat for portability"); +#endif + #if @GNULIB_FCNTL@ # if @REPLACE_FCNTL@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) diff --git a/lib/ftoastr.c b/lib/ftoastr.c index 55f1e02e80..ffd51d638c 100644 --- a/lib/ftoastr.c +++ b/lib/ftoastr.c @@ -105,7 +105,7 @@ FTOASTR (char *buf, size_t bufsize, int flags, int width, FLOAT x) Andrysco M, Jhala R, Lerner S. Printing floating-point numbers: a faster, always correct method. ACM SIGPLAN notices - POPL '16. - 2016;51(1):555-67 ; draft at + 2016;51(1):555-67 ; draft at . */ PROMOTED_FLOAT promoted_x = x; diff --git a/lib/get-permissions.c b/lib/get-permissions.c index 99b4664aae..aa78d7abf1 100644 --- a/lib/get-permissions.c +++ b/lib/get-permissions.c @@ -108,7 +108,7 @@ get_permissions (const char *name, int desc, mode_t mode, When fetching the source ACL, we simply fetch both ACL types. When setting the destination ACL, we try either ACL types, assuming that the kernel will translate the ACL from one form to the other. - (See in + (See in the description of ENOTSUP.) */ for (;;) { diff --git a/lib/gnulib.mk.in b/lib/gnulib.mk.in index 79580e931a..9a2709c22a 100644 --- a/lib/gnulib.mk.in +++ b/lib/gnulib.mk.in @@ -249,6 +249,7 @@ GL_GENERATE_STDINT_H = @GL_GENERATE_STDINT_H@ GMALLOC_OBJ = @GMALLOC_OBJ@ GMP_LIB = @GMP_LIB@ GMP_OBJ = @GMP_OBJ@ +GNULIB_ACCESS = @GNULIB_ACCESS@ GNULIB_ALPHASORT = @GNULIB_ALPHASORT@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ @@ -258,6 +259,7 @@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ GNULIB_COPY_FILE_RANGE = @GNULIB_COPY_FILE_RANGE@ +GNULIB_CREAT = @GNULIB_CREAT@ GNULIB_CTIME = @GNULIB_CTIME@ GNULIB_DIRFD = @GNULIB_DIRFD@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ @@ -838,11 +840,13 @@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ RALLOC_OBJ = @RALLOC_OBJ@ RANLIB = @RANLIB@ +REPLACE_ACCESS = @REPLACE_ACCESS@ REPLACE_CALLOC = @REPLACE_CALLOC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@ +REPLACE_CREAT = @REPLACE_CREAT@ REPLACE_CTIME = @REPLACE_CTIME@ REPLACE_DIRFD = @REPLACE_DIRFD@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ @@ -1609,12 +1613,14 @@ fcntl.h: fcntl.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_FCNTL_H''@|$(NEXT_FCNTL_H)|g' \ + -e 's/@''GNULIB_CREAT''@/$(GNULIB_CREAT)/g' \ -e 's/@''GNULIB_FCNTL''@/$(GNULIB_FCNTL)/g' \ -e 's/@''GNULIB_NONBLOCKING''@/$(GNULIB_NONBLOCKING)/g' \ -e 's/@''GNULIB_OPEN''@/$(GNULIB_OPEN)/g' \ -e 's/@''GNULIB_OPENAT''@/$(GNULIB_OPENAT)/g' \ -e 's|@''HAVE_FCNTL''@|$(HAVE_FCNTL)|g' \ -e 's|@''HAVE_OPENAT''@|$(HAVE_OPENAT)|g' \ + -e 's|@''REPLACE_CREAT''@|$(REPLACE_CREAT)|g' \ -e 's|@''REPLACE_FCNTL''@|$(REPLACE_FCNTL)|g' \ -e 's|@''REPLACE_OPEN''@|$(REPLACE_OPEN)|g' \ -e 's|@''REPLACE_OPENAT''@|$(REPLACE_OPENAT)|g' \ @@ -3176,6 +3182,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \ -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \ + -e 's/@''GNULIB_ACCESS''@/$(GNULIB_ACCESS)/g' \ -e 's/@''GNULIB_CHDIR''@/$(GNULIB_CHDIR)/g' \ -e 's/@''GNULIB_CHOWN''@/$(GNULIB_CHOWN)/g' \ -e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \ @@ -3275,7 +3282,8 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \ -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \ | \ - sed -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \ + sed -e 's|@''REPLACE_ACCESS''@|$(REPLACE_ACCESS)|g' \ + -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \ -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \ -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \ -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \ diff --git a/lib/ieee754.in.h b/lib/ieee754.in.h index a079e59d79..586455384c 100644 --- a/lib/ieee754.in.h +++ b/lib/ieee754.in.h @@ -13,7 +13,7 @@ You should have received a copy of the GNU General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _IEEE754_H diff --git a/lib/inttypes.in.h b/lib/inttypes.in.h index d3c735c12c..31e40c51a6 100644 --- a/lib/inttypes.in.h +++ b/lib/inttypes.in.h @@ -17,7 +17,7 @@ /* * ISO C 99 for platforms that lack it. - * + * */ #if __GNUC__ >= 3 diff --git a/lib/mktime.c b/lib/mktime.c index b00af96c8c..d45eee85ec 100644 --- a/lib/mktime.c +++ b/lib/mktime.c @@ -78,7 +78,7 @@ my_tzset (void) - Time zone names based on geography, without slashes, e.g. "Singapore". - Time zone names that contain explicit DST rules. Syntax: see - + The Microsoft CRT understands only the first kind. It produces incorrect results if the value of TZ is of the other kinds. But in a Cygwin environment, /etc/profile.d/tzset.sh sets TZ to a value diff --git a/lib/open.c b/lib/open.c index 655260572d..4572ebf6cd 100644 --- a/lib/open.c +++ b/lib/open.c @@ -94,20 +94,13 @@ open (const char *filename, int flags, ...) #if OPEN_TRAILING_SLASH_BUG /* If the filename ends in a slash and one of O_CREAT, O_WRONLY, O_RDWR is specified, then fail. - Rationale: POSIX - says that - "A pathname that contains at least one non-slash character and that - ends with one or more trailing slashes shall be resolved as if a - single dot character ( '.' ) were appended to the pathname." - and - "The special filename dot shall refer to the directory specified by - its predecessor." + Rationale: POSIX If the named file already exists as a directory, then - if O_CREAT is specified, open() must fail because of the semantics of O_CREAT, - if O_WRONLY or O_RDWR is specified, open() must fail because POSIX - says that it - fails with errno = EISDIR in this case. + + says that it fails with errno = EISDIR in this case. If the named file does not exist or does not name a directory, then - if O_CREAT is specified, open() must fail since open() cannot create directories, @@ -171,14 +164,6 @@ open (const char *filename, int flags, ...) #if OPEN_TRAILING_SLASH_BUG /* If the filename ends in a slash and fd does not refer to a directory, then fail. - Rationale: POSIX - says that - "A pathname that contains at least one non-slash character and that - ends with one or more trailing slashes shall be resolved as if a - single dot character ( '.' ) were appended to the pathname." - and - "The special filename dot shall refer to the directory specified by - its predecessor." If the named file without the slash is not a directory, open() must fail with ENOTDIR. */ if (fd >= 0) diff --git a/lib/pathmax.h b/lib/pathmax.h index 9463a1fb2c..4287d15870 100644 --- a/lib/pathmax.h +++ b/lib/pathmax.h @@ -20,7 +20,7 @@ /* POSIX:2008 defines PATH_MAX to be the maximum number of bytes in a filename, including the terminating NUL byte. - + PATH_MAX is not defined on systems which have no limit on filename length, such as GNU/Hurd. diff --git a/lib/pipe2.c b/lib/pipe2.c index 15a5dec985..134d9f11fc 100644 --- a/lib/pipe2.c +++ b/lib/pipe2.c @@ -107,7 +107,7 @@ pipe2 (int fd[2], int flags) if (pipe (fd) < 0) return -1; - /* POSIX + /* POSIX says that initially, the O_NONBLOCK and FD_CLOEXEC flags are cleared on both fd[0] and fd[1]. */ diff --git a/lib/stddef.in.h b/lib/stddef.in.h index 5aad1210df..945f19282d 100644 --- a/lib/stddef.in.h +++ b/lib/stddef.in.h @@ -19,7 +19,7 @@ /* * POSIX 2008 for platforms that have issues. - * + * */ #if __GNUC__ >= 3 diff --git a/lib/stdint.in.h b/lib/stdint.in.h index 21dd8d23e3..d32de34da1 100644 --- a/lib/stdint.in.h +++ b/lib/stdint.in.h @@ -17,7 +17,7 @@ /* * ISO C 99 for platforms that lack it. - * + * */ #ifndef _@GUARD_PREFIX@_STDINT_H diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h index f829525c10..e5583d967c 100644 --- a/lib/stdlib.in.h +++ b/lib/stdlib.in.h @@ -238,8 +238,8 @@ _GL_WARN_ON_USE (getloadavg, "getloadavg is not portable - " element (or NULL if it doesn't contain an "=" sign), - It returns the index of the "token" in the given array of tokens. Otherwise it returns -1, and *OPTIONP and *VALUEP are undefined. - For more details see the POSIX:2001 specification. - http://www.opengroup.org/susv3xsh/getsubopt.html */ + For more details see the POSIX specification. + https://pubs.opengroup.org/onlinepubs/9699919799/functions/getsubopt.html */ # if !@HAVE_GETSUBOPT@ _GL_FUNCDECL_SYS (getsubopt, int, (char **optionp, char *const *tokens, char **valuep) diff --git a/lib/str-two-way.h b/lib/str-two-way.h index 7078c34bdc..30806d26d6 100644 --- a/lib/str-two-way.h +++ b/lib/str-two-way.h @@ -49,7 +49,7 @@ character shift table similar to the Boyer-Moore algorithm to achieve improved (potentially sub-linear) performance. - See http://www-igm.univ-mlv.fr/~lecroq/string/node26.html#SECTION00260, + See https://www-igm.univ-mlv.fr/~lecroq/string/node26.html#SECTION00260, https://en.wikipedia.org/wiki/Boyer-Moore_string_search_algorithm, https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.34.6641&rep=rep1&type=pdf */ diff --git a/lib/string.in.h b/lib/string.in.h index 4a9292f74a..c57f041c06 100644 --- a/lib/string.in.h +++ b/lib/string.in.h @@ -693,7 +693,7 @@ _GL_WARN_ON_USE (strcasestr, "strcasestr does work correctly on character " This is a variant of strtok() that is multithread-safe. For the POSIX documentation for this function, see: - http://www.opengroup.org/susv3xsh/strtok.html + https://pubs.opengroup.org/onlinepubs/9699919799/functions/strtok.html Caveat: It modifies the original string. Caveat: These functions cannot be used on constant strings. diff --git a/lib/time.in.h b/lib/time.in.h index dd3b21273c..40e5b2063f 100644 --- a/lib/time.in.h +++ b/lib/time.in.h @@ -84,8 +84,8 @@ struct timespec # endif # if !GNULIB_defined_struct_time_t_must_be_integral -/* Per http://austingroupbugs.net/view.php?id=327, POSIX requires - time_t to be an integer type, even though C99 permits floating +/* https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_types.h.html + requires time_t to be an integer type, even though C99 permits floating point. We don't know of any implementation that uses floating point, and it is much easier to write code that doesn't have to worry about that corner case, so we force the issue. */ @@ -97,7 +97,7 @@ struct __time_t_must_be_integral { /* Sleep for at least RQTP seconds unless interrupted, If interrupted, return -1 and store the remaining time into RMTP. See - . */ + . */ # if @GNULIB_NANOSLEEP@ # if @REPLACE_NANOSLEEP@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) @@ -153,8 +153,8 @@ _GL_CXXALIASWARN (mktime); # endif /* Convert TIMER to RESULT, assuming local time and UTC respectively. See - and - . */ + and + . */ # if @GNULIB_TIME_R@ # if @REPLACE_LOCALTIME_R@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) @@ -203,8 +203,8 @@ _GL_CXXALIASWARN (gmtime_r); # endif /* Convert TIMER to RESULT, assuming local time and UTC respectively. See - and - . */ + and + . */ # if @GNULIB_LOCALTIME@ || @REPLACE_LOCALTIME@ # if @REPLACE_LOCALTIME@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) @@ -237,7 +237,7 @@ _GL_CXXALIASWARN (gmtime); /* Parse BUF as a timestamp, assuming FORMAT specifies its layout, and store the resulting broken-down time into TM. See - . */ + . */ # if @GNULIB_STRPTIME@ # if ! @HAVE_STRPTIME@ _GL_FUNCDECL_SYS (strptime, char *, (char const *restrict __buf, @@ -252,7 +252,7 @@ _GL_CXXALIASWARN (strptime); # endif /* Convert *TP to a date and time string. See - . */ + . */ # if @GNULIB_CTIME@ # if @REPLACE_CTIME@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) @@ -268,7 +268,7 @@ _GL_CXXALIASWARN (ctime); # endif /* Convert *TP to a date and time string. See - . */ + . */ # if @GNULIB_STRFTIME@ # if @REPLACE_STRFTIME@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) diff --git a/lib/timegm.c b/lib/timegm.c index c440480cb2..fc8c19fd3e 100644 --- a/lib/timegm.c +++ b/lib/timegm.c @@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _LIBC # include diff --git a/lib/unistd.in.h b/lib/unistd.in.h index 59ee39ecea..cc57ce680d 100644 --- a/lib/unistd.in.h +++ b/lib/unistd.in.h @@ -253,10 +253,28 @@ _GL_INLINE_HEADER_BEGIN /* Declare overridden functions. */ -#if defined GNULIB_POSIXCHECK +#if @GNULIB_ACCESS@ +# if @REPLACE_ACCESS@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef access +# define access rpl_access +# endif +_GL_FUNCDECL_RPL (access, int, (const char *file, int mode) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (access, int, (const char *file, int mode)); +# else +_GL_CXXALIAS_SYS (access, int, (const char *file, int mode)); +# endif +_GL_CXXALIASWARN (access); +#elif defined GNULIB_POSIXCHECK +# undef access +# if HAVE_RAW_DECL_ACCESS /* The access() function is a security risk. */ -_GL_WARN_ON_USE (access, "the access function is a security risk - " +_GL_WARN_ON_USE (access, "access does not always support X_OK - " + "use gnulib module access for portability; " + "also, this function is a security risk - " "use the gnulib module faccessat instead"); +# endif #endif @@ -277,7 +295,7 @@ _GL_WARN_ON_USE (chown, "chdir is not always in - " to GID (if GID is not -1). Follow symbolic links. Return 0 if successful, otherwise -1 and errno set. See the POSIX:2008 specification - . */ + . */ # if @REPLACE_DUP2@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define dup2 rpl_dup2 @@ -526,7 +544,7 @@ _GL_WARN_ON_USE (faccessat, "faccessat is not portable - " the given file descriptor is open. Return 0 if successful, otherwise -1 and errno set. See the POSIX:2008 specification - . */ + . */ # if ! @HAVE_FCHDIR@ _GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/)); @@ -587,7 +605,7 @@ _GL_WARN_ON_USE (fchownat, "fchownat is not portable - " /* Synchronize changes to a file. Return 0 if successful, otherwise -1 and errno set. See POSIX:2008 specification - . */ + . */ # if !@HAVE_FDATASYNC@ || !@HAVE_DECL_FDATASYNC@ _GL_FUNCDECL_SYS (fdatasync, int, (int fd)); # endif @@ -606,7 +624,7 @@ _GL_WARN_ON_USE (fdatasync, "fdatasync is unportable - " /* Synchronize changes, including metadata, to a file. Return 0 if successful, otherwise -1 and errno set. See POSIX:2008 specification - . */ + . */ # if !@HAVE_FSYNC@ _GL_FUNCDECL_SYS (fsync, int, (int fd)); # endif @@ -625,7 +643,7 @@ _GL_WARN_ON_USE (fsync, "fsync is unportable - " /* Change the size of the file to which FD is opened to become equal to LENGTH. Return 0 if successful, otherwise -1 and errno set. See the POSIX:2008 specification - . */ + . */ # if @REPLACE_FTRUNCATE@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef ftruncate @@ -655,7 +673,7 @@ _GL_WARN_ON_USE (ftruncate, "ftruncate is unportable - " Return BUF if successful, or NULL if the directory couldn't be determined or SIZE was too small. See the POSIX:2008 specification - . + . Additionally, the gnulib module 'getcwd' guarantees the following GNU extension: If BUF is NULL, an array is allocated with 'malloc'; the array is SIZE bytes long, unless SIZE == 0, in which case it is as big as @@ -815,7 +833,7 @@ _GL_WARN_ON_USE (gethostname, "gethostname is unportable - " /* Returns the user's login name, or NULL if it cannot be found. Upon error, returns NULL with errno set. - See . + See . Most programs don't need to use this function, because the information is available through environment variables: @@ -844,7 +862,7 @@ _GL_WARN_ON_USE (getlogin, "getlogin is unportable - " the case that the login name cannot be found but no specific error is provided (this case is hopefully rare but is left open by the POSIX spec). - See . + See . Most programs don't need to use this function, because the information is available through environment variables: @@ -1079,7 +1097,7 @@ _GL_WARN_ON_USE (isatty, "isatty has portability problems on native Windows - " to GID (if GID is not -1). Do not follow symbolic links. Return 0 if successful, otherwise -1 and errno set. See the POSIX:2008 specification - . */ + . */ # if @REPLACE_LCHOWN@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef lchown @@ -1109,7 +1127,7 @@ _GL_WARN_ON_USE (lchown, "lchown is unportable to pre-POSIX.1-2001 systems - " /* Create a new hard link for an existing file. Return 0 if successful, otherwise -1 and errno set. See POSIX:2008 specification - . */ + . */ # if @REPLACE_LINK@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define link rpl_link @@ -1175,7 +1193,7 @@ _GL_WARN_ON_USE (linkat, "linkat is unportable - " /* Set the offset of FD relative to SEEK_SET, SEEK_CUR, or SEEK_END. Return the new offset if successful, otherwise -1 and errno set. See the POSIX:2008 specification - . */ + . */ # if @REPLACE_LSEEK@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define lseek rpl_lseek @@ -1247,7 +1265,7 @@ _GL_WARN_ON_USE (pipe2, "pipe2 is unportable - " Return the number of bytes placed into BUF if successful, otherwise set errno and return -1. 0 indicates EOF. See the POSIX:2008 specification - . */ + . */ # if @REPLACE_PREAD@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef pread @@ -1282,7 +1300,7 @@ _GL_WARN_ON_USE (pread, "pread is unportable - " Return the number of bytes written if successful, otherwise set errno and return -1. 0 indicates nothing written. See the POSIX:2008 specification - . */ + . */ # if @REPLACE_PWRITE@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef pwrite @@ -1315,7 +1333,7 @@ _GL_WARN_ON_USE (pwrite, "pwrite is unportable - " #if @GNULIB_READ@ /* Read up to COUNT bytes from file descriptor FD into the buffer starting at BUF. See the POSIX:2008 specification - . */ + . */ # if @REPLACE_READ@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef read @@ -1339,7 +1357,7 @@ _GL_CXXALIASWARN (read); bytes of it into BUF. Return the number of bytes placed into BUF if successful, otherwise -1 and errno set. See the POSIX:2008 specification - . */ + . */ # if @REPLACE_READLINK@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define readlink rpl_readlink @@ -1449,7 +1467,7 @@ _GL_WARN_ON_USE (sethostname, "sethostname is unportable - " /* Pause the execution of the current thread for N seconds. Returns the number of seconds left to sleep. See the POSIX:2008 specification - . */ + . */ # if @REPLACE_SLEEP@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef sleep @@ -1533,7 +1551,7 @@ _GL_WARN_ON_USE (symlinkat, "symlinkat is not portable - " /* Change the size of the file designated by FILENAME to become equal to LENGTH. Return 0 if successful, otherwise -1 and errno set. See the POSIX:2008 specification - . */ + . */ # if @REPLACE_TRUNCATE@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef truncate @@ -1640,7 +1658,7 @@ _GL_WARN_ON_USE (unlinkat, "unlinkat is not portable - " /* Pause the execution of the current thread for N microseconds. Returns 0 on completion, or -1 on range error. See the POSIX:2001 specification - . */ + . */ # if @REPLACE_USLEEP@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef usleep @@ -1667,7 +1685,7 @@ _GL_WARN_ON_USE (usleep, "usleep is unportable - " #if @GNULIB_WRITE@ /* Write up to COUNT bytes starting at BUF to file descriptor FD. See the POSIX:2008 specification - . */ + . */ # if @REPLACE_WRITE@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef write diff --git a/m4/canonicalize.m4 b/m4/canonicalize.m4 index b61747bd1a..cb0896fbd8 100644 --- a/m4/canonicalize.m4 +++ b/m4/canonicalize.m4 @@ -1,4 +1,4 @@ -# canonicalize.m4 serial 30 +# canonicalize.m4 serial 31 dnl Copyright (C) 2003-2007, 2009-2019 Free Software Foundation, Inc. @@ -117,8 +117,8 @@ AC_DEFUN([gl_FUNC_REALPATH_WORKS], *-musl*) gl_cv_func_realpath_works="guessing yes" ;; # Guess no on native Windows. mingw*) gl_cv_func_realpath_works="guessing no" ;; - # If we don't know, assume the worst. - *) gl_cv_func_realpath_works="guessing no" ;; + # If we don't know, obey --enable-cross-guesses. + *) gl_cv_func_realpath_works="$gl_cross_guess_normal" ;; esac ]) rm -rf conftest.a conftest.d diff --git a/m4/extern-inline.m4 b/m4/extern-inline.m4 index ec9f2218bf..84421cef84 100644 --- a/m4/extern-inline.m4 +++ b/m4/extern-inline.m4 @@ -32,7 +32,7 @@ AC_DEFUN([gl_EXTERN_INLINE], https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html DragonFly; see - http://muscles.dragonflybsd.org/bulk/bleeding-edge-potential/latest-per-pkg/ah-tty-0.3.12.log + http://muscles.dragonflybsd.org/bulk/clang-master-potential/20141111_102002/logs/ah-tty-0.3.12.log FreeBSD; see: https://lists.gnu.org/r/bug-gnulib/2014-07/msg00104.html diff --git a/m4/fcntl_h.m4 b/m4/fcntl_h.m4 index a86fdae5fe..60dc5e2103 100644 --- a/m4/fcntl_h.m4 +++ b/m4/fcntl_h.m4 @@ -1,4 +1,4 @@ -# serial 15 +# serial 16 # Configure fcntl.h. dnl Copyright (C) 2006-2007, 2009-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation @@ -37,6 +37,7 @@ AC_DEFUN([gl_FCNTL_MODULE_INDICATOR], AC_DEFUN([gl_FCNTL_H_DEFAULTS], [ + GNULIB_CREAT=0; AC_SUBST([GNULIB_CREAT]) GNULIB_FCNTL=0; AC_SUBST([GNULIB_FCNTL]) GNULIB_NONBLOCKING=0; AC_SUBST([GNULIB_NONBLOCKING]) GNULIB_OPEN=0; AC_SUBST([GNULIB_OPEN]) @@ -44,6 +45,7 @@ AC_DEFUN([gl_FCNTL_H_DEFAULTS], dnl Assume proper GNU behavior unless another module says otherwise. HAVE_FCNTL=1; AC_SUBST([HAVE_FCNTL]) HAVE_OPENAT=1; AC_SUBST([HAVE_OPENAT]) + REPLACE_CREAT=0; AC_SUBST([REPLACE_CREAT]) REPLACE_FCNTL=0; AC_SUBST([REPLACE_FCNTL]) REPLACE_OPEN=0; AC_SUBST([REPLACE_OPEN]) REPLACE_OPENAT=0; AC_SUBST([REPLACE_OPENAT]) diff --git a/m4/fdopendir.m4 b/m4/fdopendir.m4 index b2b3b03731..ad48e4ef2d 100644 --- a/m4/fdopendir.m4 +++ b/m4/fdopendir.m4 @@ -1,4 +1,4 @@ -# serial 11 +# serial 12 # See if we need to provide fdopendir. dnl Copyright (C) 2009-2019 Free Software Foundation, Inc. @@ -49,8 +49,8 @@ DIR *fdopendir (int); *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;; # Guess yes on musl systems. *-musl*) gl_cv_func_fdopendir_works="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_fdopendir_works="guessing no" ;; + # If we don't know, obey --enable-cross-guesses. + *) gl_cv_func_fdopendir_works="$gl_cross_guess_normal" ;; esac ])]) case "$gl_cv_func_fdopendir_works" in diff --git a/m4/getgroups.m4 b/m4/getgroups.m4 index c93447bb11..556c177449 100644 --- a/m4/getgroups.m4 +++ b/m4/getgroups.m4 @@ -1,4 +1,4 @@ -# serial 22 +# serial 23 dnl From Jim Meyering. dnl A wrapper around AC_FUNC_GETGROUPS. @@ -9,8 +9,6 @@ dnl A wrapper around AC_FUNC_GETGROUPS. # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -m4_version_prereq([2.70], [] ,[ - # This is taken from the following Autoconf patch: # https://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=7fbb553727ed7e0e689a17594b58559ecf3ea6e9 AC_DEFUN([AC_FUNC_GETGROUPS], @@ -44,8 +42,8 @@ AC_DEFUN([AC_FUNC_GETGROUPS], *-gnu* | gnu*) ac_cv_func_getgroups_works="guessing yes" ;; # Guess yes on musl systems. *-musl*) ac_cv_func_getgroups_works="guessing yes" ;; - # If we don't know, assume the worst. - *) ac_cv_func_getgroups_works="guessing no" ;; + # If we don't know, obey --enable-cross-guesses. + *) ac_cv_func_getgroups_works="$gl_cross_guess_normal" ;; esac ]) ]) @@ -61,8 +59,6 @@ AC_DEFUN([AC_FUNC_GETGROUPS], LIBS=$ac_save_LIBS ])# AC_FUNC_GETGROUPS -]) - AC_DEFUN([gl_FUNC_GETGROUPS], [ AC_REQUIRE([AC_TYPE_GETGROUPS]) @@ -99,8 +95,8 @@ AC_DEFUN([gl_FUNC_GETGROUPS], *-gnu* | gnu*) gl_cv_func_getgroups_works="guessing yes" ;; # Guess yes on musl systems. *-musl*) gl_cv_func_getgroups_works="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_getgroups_works="guessing no" ;; + # If we don't know, obey --enable-cross-guesses. + *) gl_cv_func_getgroups_works="$gl_cross_guess_normal" ;; esac ])]) case "$gl_cv_func_getgroups_works" in diff --git a/m4/getopt.m4 b/m4/getopt.m4 index 5991bf83e8..8cc7827873 100644 --- a/m4/getopt.m4 +++ b/m4/getopt.m4 @@ -1,4 +1,4 @@ -# getopt.m4 serial 46 +# getopt.m4 serial 47 dnl Copyright (C) 2002-2006, 2008-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -302,8 +302,10 @@ dnl is ambiguous with environment values that contain newlines. ]])], [gl_cv_func_getopt_gnu=yes], [gl_cv_func_getopt_gnu=no], - [dnl Cross compiling. Assume the worst, even on glibc platforms. - gl_cv_func_getopt_gnu="guessing no" + [dnl Cross compiling. + dnl Assume the worst, even on glibc platforms. + dnl But obey --enable-cross-guesses. + gl_cv_func_getopt_gnu="$gl_cross_guess_normal" ]) case $gl_had_POSIXLY_CORRECT in exported) ;; diff --git a/m4/gettimeofday.m4 b/m4/gettimeofday.m4 index 5e2ef6f47e..7eebabd9c7 100644 --- a/m4/gettimeofday.m4 +++ b/m4/gettimeofday.m4 @@ -1,4 +1,4 @@ -# serial 26 +# serial 27 # Copyright (C) 2001-2003, 2005, 2007, 2009-2019 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation @@ -109,8 +109,8 @@ AC_DEFUN([gl_FUNC_GETTIMEOFDAY_CLOBBER], *-musl*) gl_cv_func_gettimeofday_clobber="guessing no" ;; # Guess no on native Windows. mingw*) gl_cv_func_gettimeofday_clobber="guessing no" ;; - # If we don't know, assume the worst. - *) gl_cv_func_gettimeofday_clobber="guessing yes" ;; + # If we don't know, obey --enable-cross-guesses. + *) gl_cv_func_gettimeofday_clobber="$gl_cross_guess_inverted" ;; esac ])]) diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4 index 57b94ed532..479c9de9ea 100644 --- a/m4/gnulib-common.m4 +++ b/m4/gnulib-common.m4 @@ -1,4 +1,4 @@ -# gnulib-common.m4 serial 44 +# gnulib-common.m4 serial 45 dnl Copyright (C) 2007-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -94,7 +94,7 @@ AC_DEFUN([gl_COMMON_BODY], [ invoked from such signal handlers. Such functions have some restrictions: * All functions that it calls should be marked _GL_ASYNC_SAFE as well, or should be listed as async-signal-safe in POSIX - + section 2.4.3. Note that malloc(), sprintf(), and fwrite(), in particular, are NOT async-signal-safe. * All memory locations (variables and struct fields) that these functions @@ -115,6 +115,33 @@ AC_DEFUN([gl_COMMON_BODY], [ errno. */ #define _GL_ASYNC_SAFE ]) + dnl Hint which direction to take regarding cross-compilation guesses: + dnl When a user installs a program on a platform they are not intimately + dnl familiar with, --enable-cross-guesses=conservative is the appropriate + dnl choice. It implements the "If we don't know, assume the worst" principle. + dnl However, when an operating system developer (on a platform which is not + dnl yet known to gnulib) builds packages for their platform, they want to + dnl expose, not hide, possible platform bugs; in this case, + dnl --enable-cross-guesses=risky is the appropriate choice. + dnl Sets the variables + dnl gl_cross_guess_normal (to be used when 'yes' is good and 'no' is bad), + dnl gl_cross_guess_inverted (to be used when 'no' is good and 'yes' is bad). + AC_ARG_ENABLE([cross-guesses], + [AS_HELP_STRING([--enable-cross-guesses={conservative|risky}], + [specify policy for cross-compilation guesses])], + [if test "x$enableval" != xconservative && test "x$enableval" != xrisky; then + AC_MSG_WARN([invalid argument supplied to --enable-cross-guesses]) + enableval=conservative + fi + gl_cross_guesses="$enableval"], + [gl_cross_guesses=conservative]) + if test $gl_cross_guesses = risky; then + gl_cross_guess_normal="guessing yes" + gl_cross_guess_inverted="guessing no" + else + gl_cross_guess_normal="guessing no" + gl_cross_guess_inverted="guessing yes" + fi dnl Preparation for running test programs: dnl Tell glibc to write diagnostics from -D_FORTIFY_SOURCE=2 to stderr, not dnl to /dev/tty, so they can be redirected to log files. Such diagnostics diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4 index 77563edc84..625c221166 100644 --- a/m4/gnulib-comp.m4 +++ b/m4/gnulib-comp.m4 @@ -1104,6 +1104,7 @@ AC_DEFUN([gl_FILE_LIST], [ m4/nstrftime.m4 m4/off_t.m4 m4/open-cloexec.m4 + m4/open-slash.m4 m4/open.m4 m4/pathmax.m4 m4/pipe2.m4 diff --git a/m4/largefile.m4 b/m4/largefile.m4 index 1938188c17..c6dd9a1003 100644 --- a/m4/largefile.m4 +++ b/m4/largefile.m4 @@ -56,7 +56,7 @@ rm -rf conftest*[]dnl # By default, many hosts won't let programs access large files; # one must use special compiler options to get large-file access to work. # For more details about this brain damage please see: -# http://www.unix-systems.org/version2/whatsnew/lfs20mar.html +# http://www.unix.org/version2/whatsnew/lfs20mar.html AC_DEFUN([AC_SYS_LARGEFILE], [AC_ARG_ENABLE(largefile, [ --disable-largefile omit support for large files]) diff --git a/m4/lstat.m4 b/m4/lstat.m4 index ace163867e..be6d3f24b4 100644 --- a/m4/lstat.m4 +++ b/m4/lstat.m4 @@ -1,4 +1,4 @@ -# serial 32 +# serial 33 # Copyright (C) 1997-2001, 2003-2019 Free Software Foundation, Inc. # @@ -63,8 +63,8 @@ AC_DEFUN([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK], # Guess no on native Windows. gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;; *) - # If we don't know, assume the worst. - gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;; + # If we don't know, obey --enable-cross-guesses. + gl_cv_func_lstat_dereferences_slashed_symlink="$gl_cross_guess_normal" ;; esac ]) rm -f conftest.sym conftest.file diff --git a/m4/memmem.m4 b/m4/memmem.m4 index af2d5bbcf5..dcccefa704 100644 --- a/m4/memmem.m4 +++ b/m4/memmem.m4 @@ -1,4 +1,4 @@ -# memmem.m4 serial 25 +# memmem.m4 serial 26 dnl Copyright (C) 2002-2004, 2007-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -68,7 +68,7 @@ AC_DEFUN([gl_FUNC_MEMMEM_SIMPLE], #endif ], [gl_cv_func_memmem_works_always="guessing yes"], - [gl_cv_func_memmem_works_always="guessing no"]) + [gl_cv_func_memmem_works_always="$gl_cross_guess_normal"]) ]) ]) case "$gl_cv_func_memmem_works_always" in @@ -138,7 +138,7 @@ static void quit (int sig) { _exit (sig + 128); } #endif ], [gl_cv_func_memmem_works_fast="guessing yes"], - [gl_cv_func_memmem_works_fast="guessing no"]) + [gl_cv_func_memmem_works_fast="$gl_cross_guess_normal"]) ]) ]) case "$gl_cv_func_memmem_works_fast" in diff --git a/m4/mktime.m4 b/m4/mktime.m4 index a86e1eebc6..405476145c 100644 --- a/m4/mktime.m4 +++ b/m4/mktime.m4 @@ -1,4 +1,4 @@ -# serial 30 +# serial 31 dnl Copyright (C) 2002-2003, 2005-2007, 2009-2019 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation @@ -247,7 +247,7 @@ main () [case "$host_os" in # Guess no on native Windows. mingw*) gl_cv_func_working_mktime="guessing no" ;; - *) gl_cv_func_working_mktime="guessing no" ;; + *) gl_cv_func_working_mktime="$gl_cross_guess_normal" ;; esac ]) ]) diff --git a/m4/nocrash.m4 b/m4/nocrash.m4 index 4d9f022690..8577038d79 100644 --- a/m4/nocrash.m4 +++ b/m4/nocrash.m4 @@ -53,7 +53,7 @@ nocrash_init (void) /* Allocate a port on which the thread shall listen for exceptions. */ if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port) == KERN_SUCCESS) { - /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */ + /* See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */ if (mach_port_insert_right (self, our_exception_port, our_exception_port, MACH_MSG_TYPE_MAKE_SEND) == KERN_SUCCESS) { @@ -72,7 +72,7 @@ nocrash_init (void) for a particular thread. This has the effect that when our exception port gets the message, the thread specific exception port has already been asked, and we don't need to bother about it. - See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */ + See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */ task_set_exception_ports (self, mask, our_exception_port, EXCEPTION_DEFAULT, MACHINE_THREAD_STATE); } diff --git a/m4/open-slash.m4 b/m4/open-slash.m4 new file mode 100644 index 0000000000..a8756ae8fe --- /dev/null +++ b/m4/open-slash.m4 @@ -0,0 +1,59 @@ +# open-slash.m4 serial 1 +dnl Copyright (C) 2007-2019 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl Tests whether open() and creat() recognize a trailing slash. +dnl Sets gl_cv_func_open_slash. +AC_DEFUN([gl_OPEN_TRAILING_SLASH_BUG], +[ + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + dnl open("foo/") should not create a file when the file name has a + dnl trailing slash. FreeBSD only has the problem on symlinks. + AC_CHECK_FUNCS_ONCE([lstat]) + AC_CACHE_CHECK([whether open recognizes a trailing slash], + [gl_cv_func_open_slash], + [# Assume that if we have lstat, we can also check symlinks. + if test $ac_cv_func_lstat = yes; then + touch conftest.tmp + ln -s conftest.tmp conftest.lnk + fi + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +#if HAVE_UNISTD_H +# include +#endif +int main () +{ + int result = 0; +#if HAVE_LSTAT + if (open ("conftest.lnk/", O_RDONLY) != -1) + result |= 1; +#endif + if (open ("conftest.sl/", O_CREAT, 0600) >= 0) + result |= 2; + return result; +}]])], + [gl_cv_func_open_slash=yes], + [gl_cv_func_open_slash=no], + [ +changequote(,)dnl + case "$host_os" in + freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*) + gl_cv_func_open_slash="guessing no" ;; + *) + gl_cv_func_open_slash="guessing yes" ;; + esac +changequote([,])dnl + ]) + rm -f conftest.sl conftest.tmp conftest.lnk + ]) + case "$gl_cv_func_open_slash" in + *no) + AC_DEFINE([OPEN_TRAILING_SLASH_BUG], [1], + [Define to 1 if open() fails to recognize a trailing slash.]) + ;; + esac +]) diff --git a/m4/open.m4 b/m4/open.m4 index 5d73f4de1a..6cf0bebb17 100644 --- a/m4/open.m4 +++ b/m4/open.m4 @@ -19,48 +19,9 @@ AC_DEFUN([gl_FUNC_OPEN], if test "$gl_cv_macro_O_CLOEXEC" != yes; then REPLACE_OPEN=1 fi - AC_CACHE_CHECK([whether open recognizes a trailing slash], - [gl_cv_func_open_slash], - [# Assume that if we have lstat, we can also check symlinks. - if test $ac_cv_func_lstat = yes; then - touch conftest.tmp - ln -s conftest.tmp conftest.lnk - fi - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#if HAVE_UNISTD_H -# include -#endif -int main () -{ - int result = 0; -#if HAVE_LSTAT - if (open ("conftest.lnk/", O_RDONLY) != -1) - result |= 1; -#endif - if (open ("conftest.sl/", O_CREAT, 0600) >= 0) - result |= 2; - return result; -}]])], - [gl_cv_func_open_slash=yes], - [gl_cv_func_open_slash=no], - [ -changequote(,)dnl - case "$host_os" in - freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*) - gl_cv_func_open_slash="guessing no" ;; - *) - gl_cv_func_open_slash="guessing yes" ;; - esac -changequote([,])dnl - ]) - rm -f conftest.sl conftest.tmp conftest.lnk - ]) + gl_OPEN_TRAILING_SLASH_BUG case "$gl_cv_func_open_slash" in *no) - AC_DEFINE([OPEN_TRAILING_SLASH_BUG], [1], - [Define to 1 if open() fails to recognize a trailing slash.]) REPLACE_OPEN=1 ;; esac diff --git a/m4/pselect.m4 b/m4/pselect.m4 index 5c72b69587..250463d80a 100644 --- a/m4/pselect.m4 +++ b/m4/pselect.m4 @@ -1,4 +1,4 @@ -# pselect.m4 serial 7 +# pselect.m4 serial 8 dnl Copyright (C) 2011-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -55,8 +55,8 @@ AC_DEFUN([gl_FUNC_PSELECT], linux-* | linux) gl_cv_func_pselect_detects_ebadf="guessing yes" ;; # Guess yes on glibc systems. *-gnu* | gnu*) gl_cv_func_pselect_detects_ebadf="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_pselect_detects_ebadf="guessing no" ;; + # If we don't know, obey --enable-cross-guesses. + *) gl_cv_func_pselect_detects_ebadf="$gl_cross_guess_normal" ;; esac ]) ]) diff --git a/m4/putenv.m4 b/m4/putenv.m4 index 342ba2636a..1267b901be 100644 --- a/m4/putenv.m4 +++ b/m4/putenv.m4 @@ -1,4 +1,4 @@ -# putenv.m4 serial 23 +# putenv.m4 serial 24 dnl Copyright (C) 2002-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -40,8 +40,8 @@ AC_DEFUN([gl_FUNC_PUTENV], *-musl*) gl_cv_func_svid_putenv="guessing yes" ;; # Guess no on native Windows. mingw*) gl_cv_func_svid_putenv="guessing no" ;; - # If we don't know, assume the worst. - *) gl_cv_func_svid_putenv="guessing no" ;; + # If we don't know, obey --enable-cross-guesses. + *) gl_cv_func_svid_putenv="$gl_cross_guess_normal" ;; esac ]) ]) diff --git a/m4/readlink.m4 b/m4/readlink.m4 index 2d7681576c..7aa6ce0337 100644 --- a/m4/readlink.m4 +++ b/m4/readlink.m4 @@ -1,4 +1,4 @@ -# readlink.m4 serial 14 +# readlink.m4 serial 15 dnl Copyright (C) 2003, 2007, 2009-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -38,8 +38,8 @@ AC_DEFUN([gl_FUNC_READLINK], linux-* | linux) gl_cv_func_readlink_works="guessing yes" ;; # Guess yes on glibc systems. *-gnu* | gnu*) gl_cv_func_readlink_works="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_readlink_works="guessing no" ;; + # If we don't know, obey --enable-cross-guesses. + *) gl_cv_func_readlink_works="$gl_cross_guess_normal" ;; esac ]) rm -f conftest.link conftest.lnk2]) diff --git a/m4/regex.m4 b/m4/regex.m4 index 35119c5c85..ad36dc2b02 100644 --- a/m4/regex.m4 +++ b/m4/regex.m4 @@ -1,4 +1,4 @@ -# serial 68 +# serial 69 # Copyright (C) 1996-2001, 2003-2019 Free Software Foundation, Inc. # @@ -243,8 +243,8 @@ AC_DEFUN([gl_REGEX], [case "$host_os" in # Guess no on native Windows. mingw*) gl_cv_func_re_compile_pattern_working="guessing no" ;; - # Otherwise, assume it is not working. - *) gl_cv_func_re_compile_pattern_working="guessing no" ;; + # Otherwise obey --enable-cross-guesses. + *) gl_cv_func_re_compile_pattern_working="$gl_cross_guess_normal" ;; esac ]) ]) diff --git a/m4/symlink.m4 b/m4/symlink.m4 index 508e94dd41..2bec317e9b 100644 --- a/m4/symlink.m4 +++ b/m4/symlink.m4 @@ -1,4 +1,4 @@ -# serial 8 +# serial 9 # See if we need to provide symlink replacement. dnl Copyright (C) 2009-2019 Free Software Foundation, Inc. @@ -40,8 +40,8 @@ AC_DEFUN([gl_FUNC_SYMLINK], linux-* | linux) gl_cv_func_symlink_works="guessing yes" ;; # Guess yes on glibc systems. *-gnu* | gnu*) gl_cv_func_symlink_works="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_symlink_works="guessing no" ;; + # If we don't know, obey --enable-cross-guesses. + *) gl_cv_func_symlink_works="$gl_cross_guess_normal" ;; esac ]) rm -f conftest.f conftest.link conftest.lnk2]) diff --git a/m4/unistd_h.m4 b/m4/unistd_h.m4 index a3b3905f84..18b7140e59 100644 --- a/m4/unistd_h.m4 +++ b/m4/unistd_h.m4 @@ -1,4 +1,4 @@ -# unistd_h.m4 serial 75 +# unistd_h.m4 serial 76 dnl Copyright (C) 2006-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -41,9 +41,9 @@ AC_DEFUN([gl_UNISTD_H], # include # endif #endif - ]], [chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir fchownat - fdatasync fsync ftruncate getcwd getdomainname getdtablesize getgroups - gethostname getlogin getlogin_r getpagesize getpass + ]], [access chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir + fchownat fdatasync fsync ftruncate getcwd getdomainname getdtablesize + getgroups gethostname getlogin getlogin_r getpagesize getpass getusershell setusershell endusershell group_member isatty lchown link linkat lseek pipe pipe2 pread pwrite readlink readlinkat rmdir sethostname sleep symlink symlinkat @@ -61,6 +61,7 @@ AC_DEFUN([gl_UNISTD_MODULE_INDICATOR], AC_DEFUN([gl_UNISTD_H_DEFAULTS], [ + GNULIB_ACCESS=0; AC_SUBST([GNULIB_ACCESS]) GNULIB_CHDIR=0; AC_SUBST([GNULIB_CHDIR]) GNULIB_CHOWN=0; AC_SUBST([GNULIB_CHOWN]) GNULIB_CLOSE=0; AC_SUBST([GNULIB_CLOSE]) @@ -159,6 +160,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS], HAVE_DECL_TTYNAME_R=1; AC_SUBST([HAVE_DECL_TTYNAME_R]) HAVE_OS_H=0; AC_SUBST([HAVE_OS_H]) HAVE_SYS_PARAM_H=0; AC_SUBST([HAVE_SYS_PARAM_H]) + REPLACE_ACCESS=0; AC_SUBST([REPLACE_ACCESS]) REPLACE_CHOWN=0; AC_SUBST([REPLACE_CHOWN]) REPLACE_CLOSE=0; AC_SUBST([REPLACE_CLOSE]) REPLACE_DUP=0; AC_SUBST([REPLACE_DUP]) diff --git a/m4/utimens.m4 b/m4/utimens.m4 index dda86b09d7..6ed6593406 100644 --- a/m4/utimens.m4 +++ b/m4/utimens.m4 @@ -3,7 +3,7 @@ dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. -dnl serial 9 +dnl serial 10 AC_DEFUN([gl_UTIMENS], [ @@ -35,8 +35,8 @@ AC_DEFUN([gl_UTIMENS], linux-* | linux) gl_cv_func_futimesat_works="guessing yes" ;; # Guess yes on glibc systems. *-gnu*) gl_cv_func_futimesat_works="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_futimesat_works="guessing no" ;; + # If we don't know, obey --enable-cross-guesses. + *) gl_cv_func_futimesat_works="$gl_cross_guess_normal" ;; esac ]) rm -f conftest.file]) diff --git a/m4/utimes.m4 b/m4/utimes.m4 index 5806d8fbbb..703f823ad5 100644 --- a/m4/utimes.m4 +++ b/m4/utimes.m4 @@ -1,5 +1,5 @@ # Detect some bugs in glibc's implementation of utimes. -# serial 6 +# serial 7 dnl Copyright (C) 2003-2005, 2009-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation @@ -147,7 +147,7 @@ main () *-musl*) gl_cv_func_working_utimes="guessing yes" ;; # Guess no on native Windows. mingw*) gl_cv_func_working_utimes="guessing no" ;; - *) gl_cv_func_working_utimes="guessing no" ;; + *) gl_cv_func_working_utimes="$gl_cross_guess_normal" ;; esac ]) ]) commit a33cda168e35cb93cdf115f7d12765f590226601 Author: Stephen Gildea Date: Sun Sep 22 20:27:53 2019 -0700 Expand time-stamp unit tests to cover all formatting options * time-stamp-tests.el: Expand unit tests to cover all formatting options. These tests validate time-stamp-pattern formatting that has existed since at least Emacs 22 (released in 2007). The tests cover both documented behavior and behavior implemented to support future migrations. * time-stamp.el (time-stamp-string): Add a second argument (TIME) to open a testing seam. Have the unit tests call this public function. * time-stamp.el (time-stamp-string, time-stamp-string-preprocess): Remove the second pass through time-string--format. (Previously both functions called it.) It was used only to handle "%", but this is now handled by having time-stamp-string-preprocess not double it. Not doubling the "%" in time-stamp-string-preprocess fixes the padding of "%2%", which was discovered by the new unit tests to be wrong. diff --git a/lisp/time-stamp.el b/lisp/time-stamp.el index ec6a45cd58..284d450155 100644 --- a/lisp/time-stamp.el +++ b/lisp/time-stamp.el @@ -409,12 +409,13 @@ With ARG, turn time stamping on if and only if arg is positive." (defun time-stamp--format (format time) (format-time-string format time time-stamp-time-zone)) -(defun time-stamp-string (&optional ts-format) +(defun time-stamp-string (&optional ts-format time) "Generate the new string to be inserted by \\[time-stamp]. Optionally use format TS-FORMAT instead of `time-stamp-format' to -format the string." +format the string. Optional second argument TIME is only for testing; +normally the current time is used." (if (stringp (or ts-format (setq ts-format time-stamp-format))) - (time-stamp--format (time-stamp-string-preprocess ts-format) nil))) + (time-stamp-string-preprocess ts-format time))) (defconst time-stamp-no-file "(no file)" @@ -495,7 +496,7 @@ and all `time-stamp-format' compatibility." (setq field-result (cond ((eq cur-char ?%) - "%%") + "%") ((eq cur-char ?a) ;day of week (if change-case (time-stamp--format "%#a" time) diff --git a/test/lisp/time-stamp-tests.el b/test/lisp/time-stamp-tests.el index 3aa659e7a6..165b4f13c2 100644 --- a/test/lisp/time-stamp-tests.el +++ b/test/lisp/time-stamp-tests.el @@ -20,17 +20,292 @@ ;;; Code: (require 'ert) +(eval-when-compile (require 'cl-lib)) (require 'time-stamp) -(defun test-stamp (ts-format time) - (time-stamp--format (time-stamp-string-preprocess ts-format time) time)) +(defmacro with-time-stamp-test-env (&rest body) + "Evaluates BODY with some standard time-stamp test variables bound." + `(let ((user-login-name "test-logname") + (user-full-name "Time Stamp Tester") + (buffer-file-name "/emacs/test/time-stamped-file") + (mail-host-address "test-mail-host-name") + (ref-time '(17337 16613)) ;Monday, Jan 2, 2006, 3:04:05 PM + (ref-time2 '(22574 61591)) ;Friday, Nov 18, 2016, 12:14:15 PM + (ref-time3 '(21377 23973 123456)) ;Sun, May 25, 2014, 03:04:05.123456am + (time-stamp-time-zone t)) ;use UTC + (cl-letf (((symbol-function 'time-stamp-conv-warn) + (lambda (old-format _new) + (ert-fail + (format "Unexpected format warning for '%s'" old-format)))) + ((symbol-function 'system-name) + (lambda () "test-system-name.example.org"))) + ;; Not all reference times are used in all tests; + ;; suppress the byte compiler's "unused" warning. + (list ref-time ref-time2 ref-time3) + ,@body))) +(put 'with-time-stamp-test-env 'lisp-indent-hook 'defun) -(ert-deftest test-time-stamp () - (let ((user-login-name "foo") - (time-stamp-time-zone t) - (time '(23847 24475 657815 318000)) - (format "%:y-%02m-%02d %02H:%02M:%02S %u")) - (should (equal (test-stamp format time) - "2019-07-11 16:11:07 foo")))) +(defmacro time-stamp-should-warn (form) + "Similar to `should' but verifies that a format warning is generated." + `(let ((warning-count 0)) + (cl-letf (((symbol-function 'time-stamp-conv-warn) + (lambda (_old _new) + (setq warning-count (1+ warning-count))))) + (should ,form) + (if (not (= warning-count 1)) + (ert-fail (format "Should have warned about format: %S" ',form)))))) + +;;; Tests: + +(ert-deftest time-stamp-test-day-of-week-documented () + "Test documented time-stamp formats for day of week." + (with-time-stamp-test-env + (should (equal (time-stamp-string "%3a" ref-time) "Mon")) + (should (equal (time-stamp-string "%3A" ref-time) "MON")) + (should (equal (time-stamp-string "%:a" ref-time) "Monday")) + (should (equal (time-stamp-string "%#A" ref-time) "MONDAY")) + (should (equal (time-stamp-string "%3a" ref-time2) "Fri")) + (should (equal (time-stamp-string "%3A" ref-time2) "FRI")) + (should (equal (time-stamp-string "%:a" ref-time2) "Friday")) + (should (equal (time-stamp-string "%#A" ref-time2) "FRIDAY")))) + +(ert-deftest time-stamp-test-day-of-week-future () + "Test implemented but as yet undocumented time-stamp formats for day of week." + (with-time-stamp-test-env + (should (equal (time-stamp-string "%#a" ref-time) "MON")) + (should (equal (time-stamp-string "%:A" ref-time) "Monday")) + (should (equal (time-stamp-string "%#a" ref-time2) "FRI")) + (should (equal (time-stamp-string "%:A" ref-time2) "Friday")))) + +(ert-deftest time-stamp-test-day-of-week-volatile-warns () + "Test time-stamp formats for day of week that will change. +Test that each generates a warning." + (with-time-stamp-test-env + (time-stamp-should-warn (equal + (time-stamp-string "%a" ref-time) "Monday")) + (time-stamp-should-warn (equal + (time-stamp-string "%A" ref-time) "MONDAY")))) + +(ert-deftest time-stamp-test-month-name-documented () + "Test documented time-stamp formats for month name." + (with-time-stamp-test-env + (should (equal (time-stamp-string "%3b" ref-time) "Jan")) + (should (equal (time-stamp-string "%3B" ref-time) "JAN")) + (should (equal (time-stamp-string "%:b" ref-time) "January")) + (should (equal (time-stamp-string "%#B" ref-time) "JANUARY")))) + +(ert-deftest time-stamp-test-month-name-future () + "Test implemented but as yet undocumented time-stamp formats for month name." + (with-time-stamp-test-env + (should (equal (time-stamp-string "%#b" ref-time) "JAN")) + (should (equal (time-stamp-string "%:B" ref-time) "January")))) + +(ert-deftest time-stamp-test-month-name-volatile-warns () + "Test time-stamp formats for month name that will change. +Test that each generates a warning." + (with-time-stamp-test-env + (time-stamp-should-warn (equal + (time-stamp-string "%b" ref-time) "January")) + (time-stamp-should-warn (equal + (time-stamp-string "%B" ref-time) "JANUARY")))) + +(ert-deftest time-stamp-test-day-of-month () + "Test time-stamp formats for day of month." + (with-time-stamp-test-env + ;; documented 1-digit + (should (equal (time-stamp-string "%:d" ref-time) "2")) + (should (equal (time-stamp-string "%2d" ref-time) " 2")) + (should (equal (time-stamp-string "%02d" ref-time) "02")) + ;; documented 2-digit + (should (equal (time-stamp-string "%:d" ref-time2) "18")) + (should (equal (time-stamp-string "%2d" ref-time2) "18")) + (should (equal (time-stamp-string "%02d" ref-time2) "18")) + ;; undocumented future formats + (should (equal (time-stamp-string "%1d" ref-time) "2")) + (should (equal (time-stamp-string "%1d" ref-time2) "18")) + ;; changing formats + (time-stamp-should-warn (equal (time-stamp-string "%d" ref-time) "2")) + (time-stamp-should-warn (equal (time-stamp-string "%_d" ref-time) "2")))) + +(ert-deftest time-stamp-test-hours-24 () + "Test time-stamp formats for hour on a 24-hour clock." + (with-time-stamp-test-env + ;; documented PM + (should (equal (time-stamp-string "%:H" ref-time) "15")) + (should (equal (time-stamp-string "%2H" ref-time) "15")) + (should (equal (time-stamp-string "%02H" ref-time) "15")) + ;; documented AM + (should (equal (time-stamp-string "%:H" ref-time2) "12")) + (should (equal (time-stamp-string "%2H" ref-time2) "12")) + (should (equal (time-stamp-string "%02H" ref-time2) "12")) + ;; documented 1-digit + (should (equal (time-stamp-string "%:H" ref-time3) "3")) + (should (equal (time-stamp-string "%2H" ref-time3) " 3")) + (should (equal (time-stamp-string "%02H" ref-time3) "03")) + ;; undocumented future formats + (should (equal (time-stamp-string "%1H" ref-time) "15")) + (should (equal (time-stamp-string "%1H" ref-time2) "12")) + (should (equal (time-stamp-string "%1H" ref-time3) "3")) + ;; changing formats + (time-stamp-should-warn (equal (time-stamp-string "%H" ref-time) "15")) + (time-stamp-should-warn (equal (time-stamp-string "%_H" ref-time) "15")))) + +(ert-deftest time-stamp-test-hours-12 () + "Test time-stamp formats for hour on a 12-hour clock." + (with-time-stamp-test-env + ;; documented 1-digit, PM + (should (equal (time-stamp-string "%:I" ref-time) "3")) + (should (equal (time-stamp-string "%2I" ref-time) " 3")) + (should (equal (time-stamp-string "%02I" ref-time) "03")) + ;; documented 2-digit + (should (equal (time-stamp-string "%:I" ref-time2) "12")) + (should (equal (time-stamp-string "%2I" ref-time2) "12")) + (should (equal (time-stamp-string "%02I" ref-time2) "12")) + ;; undocumented future formats + (should (equal (time-stamp-string "%1I" ref-time) "3")) + (should (equal (time-stamp-string "%1I" ref-time2) "12")) + ;; changing formats + (time-stamp-should-warn (equal (time-stamp-string "%I" ref-time) "3")) + (time-stamp-should-warn (equal (time-stamp-string "%_I" ref-time) "3")))) + +(ert-deftest time-stamp-test-month-number () + "Test time-stamp formats for month number." + (with-time-stamp-test-env + ;; documented 1-digit + (should (equal (time-stamp-string "%:m" ref-time) "1")) + (should (equal (time-stamp-string "%2m" ref-time) " 1")) + (should (equal (time-stamp-string "%02m" ref-time) "01")) + ;; documented 2-digit + (should (equal (time-stamp-string "%:m" ref-time2) "11")) + (should (equal (time-stamp-string "%2m" ref-time2) "11")) + (should (equal (time-stamp-string "%02m" ref-time2) "11")) + ;; undocumented future formats + (should (equal (time-stamp-string "%1m" ref-time) "1")) + (should (equal (time-stamp-string "%1m" ref-time2) "11")) + ;; changing formats + (time-stamp-should-warn (equal (time-stamp-string "%m" ref-time) "1")) + (time-stamp-should-warn (equal (time-stamp-string "%_m" ref-time) "1")))) + +(ert-deftest time-stamp-test-minute () + "Test time-stamp formats for minute." + (with-time-stamp-test-env + ;; documented 1-digit + (should (equal (time-stamp-string "%:M" ref-time) "4")) + (should (equal (time-stamp-string "%2M" ref-time) " 4")) + (should (equal (time-stamp-string "%02M" ref-time) "04")) + ;; documented 2-digit + (should (equal (time-stamp-string "%:M" ref-time2) "14")) + (should (equal (time-stamp-string "%2M" ref-time2) "14")) + (should (equal (time-stamp-string "%02M" ref-time2) "14")) + ;; undocumented future formats + (should (equal (time-stamp-string "%1M" ref-time) "4")) + (should (equal (time-stamp-string "%1M" ref-time2) "14")) + ;; changing formats + (time-stamp-should-warn (equal (time-stamp-string "%M" ref-time) "4")) + (time-stamp-should-warn (equal (time-stamp-string "%_M" ref-time) "4")))) + +(ert-deftest time-stamp-test-second () + "Test time-stamp formats for second." + (with-time-stamp-test-env + ;; documented 1-digit + (should (equal (time-stamp-string "%:S" ref-time) "5")) + (should (equal (time-stamp-string "%2S" ref-time) " 5")) + (should (equal (time-stamp-string "%02S" ref-time) "05")) + ;; documented 2-digit + (should (equal (time-stamp-string "%:S" ref-time2) "15")) + (should (equal (time-stamp-string "%2S" ref-time2) "15")) + (should (equal (time-stamp-string "%02S" ref-time2) "15")) + ;; undocumented future formats + (should (equal (time-stamp-string "%1S" ref-time) "5")) + (should (equal (time-stamp-string "%1S" ref-time2) "15")) + ;; changing formats + (time-stamp-should-warn (equal (time-stamp-string "%S" ref-time) "5")) + (time-stamp-should-warn (equal (time-stamp-string "%_S" ref-time) "5")))) + +(ert-deftest time-stamp-test-am-pm () + "Test time-stamp formats for AM and PM strings." + (with-time-stamp-test-env + ;; documented + (should (equal (time-stamp-string "%#p" ref-time) "pm")) + (should (equal (time-stamp-string "%P" ref-time) "PM")) + (should (equal (time-stamp-string "%#p" ref-time3) "am")) + (should (equal (time-stamp-string "%P" ref-time3) "AM")) + ;; changing + (time-stamp-should-warn (equal (time-stamp-string "%p" ref-time) "pm")))) + +(ert-deftest time-stamp-test-day-number-in-week () + "Test time-stamp formats for day number in week." + (with-time-stamp-test-env + (should (equal (time-stamp-string "%w" ref-time) "1")) + (should (equal (time-stamp-string "%w" ref-time2) "5")) + (should (equal (time-stamp-string "%w" ref-time3) "0")))) + +(ert-deftest time-stamp-test-year () + "Test time-stamp formats for year." + (with-time-stamp-test-env + ;; documented + (should (equal (time-stamp-string "%02y" ref-time) "06")) + (should (equal (time-stamp-string "%:y" ref-time) "2006")) + ;; undocumented future formats + (should (equal (time-stamp-string "%Y" ref-time) "2006")) + ;; changing + (time-stamp-should-warn (equal (time-stamp-string "%y" ref-time) "2006")))) + +(ert-deftest time-stamp-test-time-zone () + "Test time-stamp formats for time zone." + (with-time-stamp-test-env + ;; documented + (should (equal (time-stamp-string "%z" ref-time) "gmt")) + (should (equal (time-stamp-string "%Z" ref-time) "GMT")) + ;; undocumented future formats + (should (equal (time-stamp-string "%#Z" ref-time) "gmt")))) + +(ert-deftest time-stamp-test-non-date-conversions () + "Test time-stamp formats for non-date items." + (with-time-stamp-test-env + ;; documented + (should (equal (time-stamp-string "%%" ref-time) "%")) ;% last char + (should (equal (time-stamp-string "%%P" ref-time) "%P")) ;% not last char + (should (equal (time-stamp-string "%f" ref-time) "time-stamped-file")) + (should (equal + (time-stamp-string "%F" ref-time) "/emacs/test/time-stamped-file")) + (should + (equal (time-stamp-string "%s" ref-time) "test-system-name.example.org")) + (should (equal (time-stamp-string "%u" ref-time) "test-logname")) + (should (equal (time-stamp-string "%U" ref-time) "Time Stamp Tester")) + (should (equal (time-stamp-string "%h" ref-time) "test-mail-host-name")) + ;; undocumented + (should (equal (time-stamp-string "%L" ref-time) "Time Stamp Tester")) + (should (equal (time-stamp-string "%l" ref-time) "test-logname")) + (should (equal + (time-stamp-string "%Q" ref-time) "test-system-name.example.org")) + (should (equal + (time-stamp-string "%q" ref-time) "test-system-name")))) + +(ert-deftest time-stamp-test-ignored-modifiers () + "Test additional args allowed (but ignored) to allow for future expansion." + (with-time-stamp-test-env + ;; allowed modifiers + (should (equal (time-stamp-string "%.,@-+_ ^(stuff)P" ref-time3) "AM")) + ;; not all punctuation is allowed + (should-not (equal (time-stamp-string "%&P" ref-time3) "AM")))) + +(ert-deftest time-stamp-test-non-conversions () + "Test that without a %, the text is copied literally." + (with-time-stamp-test-env + (should (equal (time-stamp-string "No percent" ref-time) "No percent")))) + +(ert-deftest time-stamp-test-string-width () + "Test time-stamp string width modifiers." + (with-time-stamp-test-env + ;; strings truncate on the right or are blank-padded on the left + (should (equal (time-stamp-string "%0P" ref-time3) "")) + (should (equal (time-stamp-string "%1P" ref-time3) "A")) + (should (equal (time-stamp-string "%2P" ref-time3) "AM")) + (should (equal (time-stamp-string "%3P" ref-time3) " AM")) + (should (equal (time-stamp-string "%0%" ref-time3) "")) + (should (equal (time-stamp-string "%1%" ref-time3) "%")) + (should (equal (time-stamp-string "%2%" ref-time3) " %")) + (should (equal (time-stamp-string "%#3a" ref-time3) "SUN")))) ;;; time-stamp-tests.el ends here commit 4eac64fcf21fc54d562d9ac5903ed241c747372b Author: Lars Ingebrigtsen Date: Mon Sep 23 02:13:26 2019 +0200 Clarify `debug' doc string * lisp/emacs-lisp/debug.el (debug): Mention that inhibit-redisplay will inhibit the function. diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el index 8989aa0719..21499f7579 100644 --- a/lisp/emacs-lisp/debug.el +++ b/lisp/emacs-lisp/debug.el @@ -163,7 +163,10 @@ of the evaluator. You may call with no args, or you may pass nil as the first arg and any other args you like. In that case, the list of args after the -first will be printed into the backtrace buffer." +first will be printed into the backtrace buffer. + +If `inhibit-redisplay' is non-nil when this function is called, +the debugger will not be entered." (interactive) (cond (inhibit-redisplay commit ff7560b6ffba3d8602debd9a2a5c47509a67d4be Author: Lars Ingebrigtsen Date: Mon Sep 23 01:06:15 2019 +0200 Make Message warn about invalid addresses * lisp/gnus/message.el (message-check-recipients): Warn about invalid email addresses (bug#32639). diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index ef9f8429d4..4ea8f7b02e 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -4364,6 +4364,14 @@ This function could be useful in `message-setup-hook'." (dolist (hdr '("To" "Cc" "Bcc")) (let ((addr (message-fetch-field hdr))) (when (stringp addr) + ;; First check for syntactically invalid addresses. + (dolist (address (mail-header-parse-addresses addr t)) + (unless (mail-header-parse-addresses address) + (unless (y-or-n-p + (format "Email address %s looks invalid; send anyway?" + address)) + (user-error "Invalid address %s" address)))) + ;; Then check for likely-bogus addresses. (dolist (bog (message-bogus-recipient-p addr)) (and bog (not (y-or-n-p commit a5eae3d15f8a490d88a86a71540e0ba3ec640eec Author: Lars Ingebrigtsen Date: Mon Sep 23 00:45:33 2019 +0200 Remove Gnus posting style reference to message-reply-headers * doc/misc/gnus.texi (Posting Styles): Remove bit about message-reply-headers, because it has never worked. diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index 4db0579eba..4824cdc962 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi @@ -12855,10 +12855,7 @@ The attribute value can be a string, a function with zero arguments (the return value will be used), a variable (its value will be used) or a list (it will be @code{eval}ed and the return value will be used). The functions and sexps are called/@code{eval}ed in the -message buffer that is being set up. The headers of the current -article are available through the @code{message-reply-headers} -variable, which is a @code{mail-header} object that can be accessed -via the @code{mail-header-*} accessors. +message buffer that is being set up. In the case of a string value, if the @code{match} is a regular expression, or if it takes the form @code{(header @var{match} @@ -12868,8 +12865,6 @@ the corresponding parenthetical matches (@pxref{Replacing Match,, Replacing the Text that Matched, elisp, The Emacs Lisp Reference Manual}.) -@vindex message-reply-headers - If you wish to check whether the message you are about to compose is meant to be a news article or a mail message, you can check the values of the @code{message-news-p} and @code{message-mail-p} functions. commit 1f89fedc18ed8c400f1e26ebc9901ab600d78a26 Author: Lars Ingebrigtsen Date: Mon Sep 23 00:29:42 2019 +0200 gnus-use-atomic-windows should default to nil * lisp/gnus/gnus-win.el (gnus-use-atomic-windows): Default to nil. diff --git a/lisp/gnus/gnus-win.el b/lisp/gnus/gnus-win.el index cc3141cf63..b39c9faab6 100644 --- a/lisp/gnus/gnus-win.el +++ b/lisp/gnus/gnus-win.el @@ -39,7 +39,7 @@ :group 'gnus-windows :type 'boolean) -(defcustom gnus-use-atomic-windows t +(defcustom gnus-use-atomic-windows nil "If non-nil, Gnus' window compositions will be atomic." :type 'boolean :version "27.1") commit 9d96aa5ae336e6d9c99e3b074bf72ec191a16d00 Author: Lars Ingebrigtsen Date: Mon Sep 23 00:26:40 2019 +0200 message-reply-headers doc fix * doc/misc/gnus.texi (Posting Styles): Update the type of the message-reply-headers object. diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index 8575f47f38..4db0579eba 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi @@ -12857,8 +12857,8 @@ or a list (it will be @code{eval}ed and the return value will be used). The functions and sexps are called/@code{eval}ed in the message buffer that is being set up. The headers of the current article are available through the @code{message-reply-headers} -variable, which is a vector of the following headers: number subject -from date id references chars lines xref extra. +variable, which is a @code{mail-header} object that can be accessed +via the @code{mail-header-*} accessors. In the case of a string value, if the @code{match} is a regular expression, or if it takes the form @code{(header @var{match} commit e3bd6c406da2ea98bfcf6bbd37db78462fd75b31 Author: Lars Ingebrigtsen Date: Mon Sep 23 00:06:25 2019 +0200 mailclient can't send attachments * lisp/mail/mailclient.el (mailclient-send-it): Warn about trying to send attachments (bug#34992). diff --git a/lisp/mail/mailclient.el b/lisp/mail/mailclient.el index 4d8cda10ff..0c2594cc83 100644 --- a/lisp/mail/mailclient.el +++ b/lisp/mail/mailclient.el @@ -47,6 +47,7 @@ (require 'sendmail) ;; for mail-sendmail-undelimit-header (require 'mail-utils) ;; for mail-fetch-field (require 'browse-url) +(require 'mail-parse) (defcustom mailclient-place-body-on-clipboard-flag (fboundp 'w32-set-clipboard-data) @@ -141,6 +142,14 @@ The mail client is taken to be the handler of mailto URLs." (concat (save-excursion (narrow-to-region (point-min) delimline) + ;; We can't send multipart/* messages (i. e. with + ;; attachments or the like) via this method. + (when-let ((type (mail-fetch-field "content-type"))) + (when (and (string-match "multipart" + (car (mail-header-parse-content-type + type))) + (not (y-or-n-p "Message with attachments can't be sent via mailclient; continue anyway?"))) + (error "Choose a different `send-mail-function' to send attachments"))) (goto-char (point-min)) (setq coding-system (if (re-search-forward mime-charset-pattern nil t) commit 9aacc443d9465793b96cb844469056ae80e6d91b Author: Jackson Ray Hamilton Date: Sun Sep 22 12:55:44 2019 -0700 Ignore comments and strings when recognizing JSX * lisp/progmodes/js.el (js-syntax-propertize): Ignore comments and strings. * test/manual/indent/jsx-comment-string.jsx: New test. diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index 65a2538c30..3050e8f1a7 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -2358,7 +2358,11 @@ testing for syntax only valid as JSX." 'syntax-table (string-to-syntax "\"/")) (js-syntax-propertize-regexp end))))) ("\\`\\(#\\)!" (1 "< b")) - ("<" (0 (ignore (if js-jsx-syntax (js-jsx--syntax-propertize-tag end)))))) + ("<" (0 (ignore + (when js-jsx-syntax + ;; Not inside a comment or string. + (unless (nth 8 (save-excursion (syntax-ppss (match-beginning 0)))) + (js-jsx--syntax-propertize-tag end))))))) (point) end)) (defconst js--prettify-symbols-alist diff --git a/test/manual/indent/jsx-comment-string.jsx b/test/manual/indent/jsx-comment-string.jsx new file mode 100644 index 0000000000..37a6c3233d --- /dev/null +++ b/test/manual/indent/jsx-comment-string.jsx @@ -0,0 +1,16 @@ +// Local Variables: +// indent-tabs-mode: nil +// js-indent-level: 2 +// End: + +// The following tests go below any comments to avoid including +// misindented comments among the erroring lines. + +// The JSX-like text in comments/strings should be treated like the enclosing +// syntax, not like JSX. + +// +void 0 + +"" +void 0 commit ee89c1cdb5a3bb7b69b763a59a20b34508ddf3ae Author: Jackson Ray Hamilton Date: Sun Sep 22 11:57:57 2019 -0700 Make js-jsx-regexps case-sensitive The regexp in this list used a capitalized “React” because it actually should be capitalized like that. Otherwise, the following code would produce a false positive match: import Thing from './react/Thing' * lisp/progmodes/js.el (js-jsx-regexps): Update docstring. (js-jsx--detect-and-enable): Match case-sensitively when determining whether JSX should be enabled. diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index 161fd5c00b..65a2538c30 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -4484,7 +4484,7 @@ their `mode-name' updates to show enabled syntax extensions." (defvar js-jsx-regexps (list "\\_<\\(?:var\\|let\\|const\\|import\\)\\_>.*?React") - "Regexps for detecting JSX in JavaScript buffers. + "Case-sensitive regexps for detecting JSX in JavaScript buffers. When `js-jsx-detect-syntax' is non-nil and any of these regexps match text near the beginning of a JavaScript buffer, `js-jsx-syntax' (which see) will be made buffer-local and set to @@ -4504,7 +4504,9 @@ is non-nil. Return t after enabling, nil otherwise." (catch 'match (mapc (lambda (regexp) - (if (re-search-forward regexp 4000 t) (throw 'match t))) + (when (let (case-fold-search) + (re-search-forward regexp 4000 t)) + (throw 'match t))) js-jsx-regexps) nil)))) (js-jsx-enable) commit 2f600e97e7ca43965f55f019759582d93d8bca73 Author: Paul Eggert Date: Sun Sep 22 10:43:21 2019 -0700 Avoid crashes when casifying noncontiguous regions This is a followon fix for Bug#37477. * lisp/simple.el (region-extract-function): Use setq here, since the var is now defined in C code. * src/casefiddle.c (casify_pnc_region): New function. (Fupcase_region, Fdowncase_region, Fcapitalize_region) (Fupcase_initials_region): Use it. (Fupcase_initials_region): Add region-noncontiguous-p flag for consistency with the others. All uses changed. (syms_of_casefiddle): Define Qbounds, Vregion_extract_function. * src/insdel.c (prepare_to_modify_buffer_1): * src/keyboard.c (command_loop_1): Use Vregion_extraction_function. * src/insdel.c (syms_of_insdel): No need to define Qregion_extract_function. * test/src/casefiddle-tests.el (casefiddle-oldfunc): New var. (casefiddle-loopfunc, casefiddle-badfunc): New functions. (casefiddle-invalid-region-extract-function): New test. diff --git a/etc/NEWS b/etc/NEWS index 8a880e5b63..73f0ca2497 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -488,7 +488,8 @@ interface that's more like functions like 'search-forward'. --- ** More commands support noncontiguous rectangular regions, namely 'upcase-dwim', 'downcase-dwim', 'capitalize-dwim', 'capitalize-region', -'replace-string', 'replace-regexp', and 'delimit-columns-region'. +'upcase-initials-region', 'replace-string', 'replace-regexp', and +'delimit-columns-region'. +++ ** When asked to visit a large file, Emacs now offers visiting it literally. diff --git a/lisp/simple.el b/lisp/simple.el index 31e3b2bbab..ecd7eb797e 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -1087,7 +1087,7 @@ instead of deleted." :group 'killing :version "24.1") -(defvar region-extract-function +(setq region-extract-function (lambda (method) (when (region-beginning) (cond @@ -1096,19 +1096,7 @@ instead of deleted." ((eq method 'delete-only) (delete-region (region-beginning) (region-end))) (t - (filter-buffer-substring (region-beginning) (region-end) method))))) - "Function to get the region's content. -Called with one argument METHOD which can be: -- nil: return the content as a string (list of strings for - non-contiguous regions). -- `delete-only': delete the region; the return value is undefined. -- `bounds': return the boundaries of the region as a list of one - or more cons cells of the form (START . END). -- anything else: delete the region and return its content - as a string (or list of strings for non-contiguous regions), - after filtering it with `filter-buffer-substring', which - is called, for each contiguous sub-region, with METHOD as its - 3rd argument.") + (filter-buffer-substring (region-beginning) (region-end) method)))))) (defvar region-insert-function (lambda (lines) diff --git a/src/casefiddle.c b/src/casefiddle.c index 3a1724b306..774906df04 100644 --- a/src/casefiddle.c +++ b/src/casefiddle.c @@ -516,34 +516,43 @@ casify_region (enum case_action flag, Lisp_Object b, Lisp_Object e) return orig_end + added; } -DEFUN ("upcase-region", Fupcase_region, Supcase_region, 2, 3, - "(list (region-beginning) (region-end) (region-noncontiguous-p))", - doc: /* Convert the region to upper case. In programs, wants two arguments. -These arguments specify the starting and ending character numbers of -the region to operate on. When used as a command, the text between -point and the mark is operated on. -See also `capitalize-region'. */) - (Lisp_Object beg, Lisp_Object end, Lisp_Object region_noncontiguous_p) -{ - Lisp_Object bounds = Qnil; +/* Casify a possibly noncontiguous region according to FLAG. BEG and + END specify the bounds, except that if REGION_NONCONTIGUOUS_P is + non-nil, the region's bounds are specified by (funcall + region-extract-function 'bounds) instead. */ +static Lisp_Object +casify_pnc_region (enum case_action flag, Lisp_Object beg, Lisp_Object end, + Lisp_Object region_noncontiguous_p) +{ if (!NILP (region_noncontiguous_p)) { - bounds = call1 (Fsymbol_value (Qregion_extract_function), - intern ("bounds")); - - while (CONSP (bounds)) + Lisp_Object bounds = call1 (Vregion_extract_function, Qbounds); + FOR_EACH_TAIL (bounds) { - casify_region (CASE_UP, XCAR (XCAR (bounds)), XCDR (XCAR (bounds))); - bounds = XCDR (bounds); + CHECK_CONS (XCAR (bounds)); + casify_region (flag, XCAR (XCAR (bounds)), XCDR (XCAR (bounds))); } + CHECK_LIST_END (bounds, bounds); } else - casify_region (CASE_UP, beg, end); + casify_region (flag, beg, end); return Qnil; } +DEFUN ("upcase-region", Fupcase_region, Supcase_region, 2, 3, + "(list (region-beginning) (region-end) (region-noncontiguous-p))", + doc: /* Convert the region to upper case. In programs, wants two arguments. +These arguments specify the starting and ending character numbers of +the region to operate on. When used as a command, the text between +point and the mark is operated on. +See also `capitalize-region'. */) + (Lisp_Object beg, Lisp_Object end, Lisp_Object region_noncontiguous_p) +{ + return casify_pnc_region (CASE_UP, beg, end, region_noncontiguous_p); +} + DEFUN ("downcase-region", Fdowncase_region, Sdowncase_region, 2, 3, "(list (region-beginning) (region-end) (region-noncontiguous-p))", doc: /* Convert the region to lower case. In programs, wants two arguments. @@ -552,23 +561,7 @@ the region to operate on. When used as a command, the text between point and the mark is operated on. */) (Lisp_Object beg, Lisp_Object end, Lisp_Object region_noncontiguous_p) { - Lisp_Object bounds = Qnil; - - if (!NILP (region_noncontiguous_p)) - { - bounds = call1 (Fsymbol_value (Qregion_extract_function), - intern ("bounds")); - - while (CONSP (bounds)) - { - casify_region (CASE_DOWN, XCAR (XCAR (bounds)), XCDR (XCAR (bounds))); - bounds = XCDR (bounds); - } - } - else - casify_region (CASE_DOWN, beg, end); - - return Qnil; + return casify_pnc_region (CASE_DOWN, beg, end, region_noncontiguous_p); } DEFUN ("capitalize-region", Fcapitalize_region, Scapitalize_region, 2, 3, @@ -580,38 +573,23 @@ In programs, give two arguments, the starting and ending character positions to operate on. */) (Lisp_Object beg, Lisp_Object end, Lisp_Object region_noncontiguous_p) { - Lisp_Object bounds = Qnil; - - if (!NILP (region_noncontiguous_p)) - { - bounds = call1 (Fsymbol_value (Qregion_extract_function), - intern ("bounds")); - - while (CONSP (bounds)) - { - casify_region (CASE_CAPITALIZE, XCAR (XCAR (bounds)), XCDR (XCAR (bounds))); - bounds = XCDR (bounds); - } - } - else - casify_region (CASE_CAPITALIZE, beg, end); - - return Qnil; + return casify_pnc_region (CASE_CAPITALIZE, beg, end, region_noncontiguous_p); } /* Like Fcapitalize_region but change only the initials. */ DEFUN ("upcase-initials-region", Fupcase_initials_region, - Supcase_initials_region, 2, 2, "r", + Supcase_initials_region, 2, 3, + "(list (region-beginning) (region-end) (region-noncontiguous-p))", doc: /* Upcase the initial of each word in the region. This means that each word's first character is converted to either title case or upper case, and the rest are left unchanged. In programs, give two arguments, the starting and ending character positions to operate on. */) - (Lisp_Object beg, Lisp_Object end) + (Lisp_Object beg, Lisp_Object end, Lisp_Object region_noncontiguous_p) { - casify_region (CASE_CAPITALIZE_UP, beg, end); - return Qnil; + return casify_pnc_region (CASE_CAPITALIZE_UP, beg, end, + region_noncontiguous_p); } static Lisp_Object @@ -668,12 +646,28 @@ With negative argument, capitalize previous words but do not move. */) void syms_of_casefiddle (void) { + DEFSYM (Qbounds, "bounds"); DEFSYM (Qidentity, "identity"); DEFSYM (Qtitlecase, "titlecase"); DEFSYM (Qspecial_uppercase, "special-uppercase"); DEFSYM (Qspecial_lowercase, "special-lowercase"); DEFSYM (Qspecial_titlecase, "special-titlecase"); + DEFVAR_LISP ("region-extract-function", Vregion_extract_function, + doc: /* Function to get the region's content. +Called with one argument METHOD which can be: +- nil: return the content as a string (list of strings for + non-contiguous regions). +- `delete-only': delete the region; the return value is undefined. +- `bounds': return the boundaries of the region as a list of one + or more cons cells of the form (START . END). +- anything else: delete the region and return its content + as a string (or list of strings for non-contiguous regions), + after filtering it with `filter-buffer-substring', which + is called, for each contiguous sub-region, with METHOD as its + 3rd argument. */); + Vregion_extract_function = Qnil; /* simple.el sets this. */ + defsubr (&Supcase); defsubr (&Sdowncase); defsubr (&Scapitalize); diff --git a/src/insdel.c b/src/insdel.c index 093b841d6d..ebfd022ac6 100644 --- a/src/insdel.c +++ b/src/insdel.c @@ -2002,7 +2002,7 @@ prepare_to_modify_buffer_1 (ptrdiff_t start, ptrdiff_t end, : (!NILP (Vselect_active_regions) && !NILP (Vtransient_mark_mode)))) Vsaved_region_selection - = call1 (Fsymbol_value (Qregion_extract_function), Qnil); + = call1 (Vregion_extract_function, Qnil); signal_before_change (start, end, preserve_ptr); Fset (Qdeactivate_mark, Qt); @@ -2401,7 +2401,5 @@ handling of the active region per `select-active-regions'. */); inhibit_modification_hooks = 0; DEFSYM (Qinhibit_modification_hooks, "inhibit-modification-hooks"); - DEFSYM (Qregion_extract_function, "region-extract-function"); - defsubr (&Scombine_after_change_execute); } diff --git a/src/keyboard.c b/src/keyboard.c index 1b9a603ca1..a16d13cc7b 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -1535,7 +1535,7 @@ command_loop_1 (void) Vselection_inhibit_update_commands))) { Lisp_Object txt - = call1 (Fsymbol_value (Qregion_extract_function), Qnil); + = call1 (Vregion_extract_function, Qnil); if (XFIXNUM (Flength (txt)) > 0) /* Don't set empty selections. */ call2 (Qgui_set_selection, QPRIMARY, txt); diff --git a/src/search.c b/src/search.c index 9b674a5810..1e57d2ecbe 100644 --- a/src/search.c +++ b/src/search.c @@ -2739,7 +2739,7 @@ since only regular expressions have distinguished subexpressions. */) Qnil); else if (case_action == cap_initial) Fupcase_initials_region (make_fixnum (search_regs.start[sub]), - make_fixnum (newpoint)); + make_fixnum (newpoint), Qnil); /* The replace_range etc. functions can trigger modification hooks (see signal_before_change and signal_after_change). Try to error diff --git a/test/src/casefiddle-tests.el b/test/src/casefiddle-tests.el index ed9a2f9330..54793f2cda 100644 --- a/test/src/casefiddle-tests.el +++ b/test/src/casefiddle-tests.el @@ -259,5 +259,22 @@ (should (eq tc (capitalize ch))) (should (eq tc (upcase-initials ch)))))) +(defvar casefiddle-oldfunc region-extract-function) + +(defun casefiddle-loopfunc (method) + (if (eq method 'bounds) + (let ((looping (list '(1 . 1)))) + (setcdr looping looping)) + (funcall casefiddle-oldfunc method))) + +(defun casefiddle-badfunc (method) + (if (eq method 'bounds) + '(()) + (funcall casefiddle-oldfunc method))) + +(ert-deftest casefiddle-invalid-region-extract-function () + (dolist (region-extract-function '(casefiddle-badfunc casefiddle-loopfunc)) + (with-temp-buffer + (should-error (upcase-region nil nil t))))) ;;; casefiddle-tests.el ends here commit dddff96a585531608d5e8d27375a6363679a9fb5 Author: Stefan Monnier Date: Sun Sep 22 12:54:48 2019 -0400 * lisp/help-fns.el: Fix missing dependency diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 3c0a72e263..d6b4e763bb 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -35,6 +35,7 @@ (require 'cl-lib) (require 'help-mode) (require 'radix-tree) +(eval-when-compile (require 'subr-x)) ;For when-let. (defvar help-fns-describe-function-functions nil "List of functions to run in help buffer in `describe-function'. commit 902e9297aaf05520e571e91fd801ccced0424651 Author: Lars Ingebrigtsen Date: Sun Sep 22 14:49:57 2019 +0200 Remove references to domain that no longer exists * doc/misc/gnus-faq.texi (FAQ 7-1): * doc/misc/gnus.texi (Maildir): * lisp/gnus/nnmaildir.el: qmail.org no longer exists. diff --git a/doc/misc/gnus-faq.texi b/doc/misc/gnus-faq.texi index e2cfa79619..f295c997cb 100644 --- a/doc/misc/gnus-faq.texi +++ b/doc/misc/gnus-faq.texi @@ -1952,10 +1952,8 @@ and @uref{http://pyropus.ca/software/getmail/, getmail}. You should tell those to write the mail to your disk and Gnus to read it from there. Last but not least the mail sending part: This can be done with every MTA like -@uref{http://www.sendmail.org/, sendmail}, -@uref{http://www.qmail.org/, postfix}, -@uref{http://www.exim.org/, exim} or -@uref{http://www.qmail.org/, qmail}. +@uref{http://www.sendmail.org/, sendmail} or +@uref{http://www.exim.org/, exim}. On windows boxes I'd vote for @uref{http://www.tglsoft.de/, Hamster}, diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index ef8ba4c30c..8575f47f38 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi @@ -16416,8 +16416,7 @@ have to set this variable to @code{t}. The default is @code{nil}. @code{nnmaildir} stores mail in the maildir format, with each maildir corresponding to a group in Gnus. This format is documented here: -@uref{http://cr.yp.to/proto/maildir.html} and here: -@uref{http://www.qmail.org/man/man5/maildir.html}. @code{nnmaildir} +@uref{http://cr.yp.to/proto/maildir.html}. @code{nnmaildir} also stores extra information in the @file{.nnmaildir/} directory within a maildir. diff --git a/lisp/gnus/nnmaildir.el b/lisp/gnus/nnmaildir.el index d62e1e9253..3ffdc4630d 100644 --- a/lisp/gnus/nnmaildir.el +++ b/lisp/gnus/nnmaildir.el @@ -21,10 +21,9 @@ ;;; Commentary: -;; Maildir format is documented at -;; and in the maildir(5) man page from qmail (available at -;; ). nnmaildir also stores -;; extra information in the .nnmaildir/ directory within a maildir. +;; Maildir format is documented at . +;; nnmaildir also stores extra information in the .nnmaildir/ directory +;; within a maildir. ;; ;; Some goals of nnmaildir: ;; * Everything Just Works, and correctly. E.g., NOV data is automatically commit d8157a113396ab1563c4909e26f5717097f47a9e Author: Lars Ingebrigtsen Date: Sun Sep 22 14:35:09 2019 +0200 Fix "password" detection in authinfo mode * lisp/auth-source.el (authinfo--hide-passwords): Ensure that we only hit actual "password" entries and not "foo-password" and the like. diff --git a/lisp/auth-source.el b/lisp/auth-source.el index 9669ae976c..6d53a222e9 100644 --- a/lisp/auth-source.el +++ b/lisp/auth-source.el @@ -2416,9 +2416,9 @@ passwords are revealed when point moved into the password. (save-restriction (narrow-to-region start end) (goto-char start) - (while (re-search-forward "\\bpassword +\\([^\n\t ]+\\)" + (while (re-search-forward "\\(\\s-\\|^\\)password\\s-+\\([^\n\t ]+\\)" nil t) - (let ((overlay (make-overlay (match-beginning 1) (match-end 1)))) + (let ((overlay (make-overlay (match-beginning 2) (match-end 2)))) (overlay-put overlay 'display (propertize "****" 'face 'warning)) (overlay-put overlay 'reveal-toggle-invisible commit 942665d6d2d8b4dc8e7964a7684f075b8184d2c3 Author: Lars Ingebrigtsen Date: Sun Sep 22 14:28:13 2019 +0200 Fix warning about @xref in parenthesis * doc/misc/gnus.texi (Window Layout): Use @pxref in parentheses. diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index d535c1a49e..ef8ba4c30c 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi @@ -22924,7 +22924,7 @@ to fiddle with @code{gnus-tree-minimize-window} to avoid having the windows resized. Lastly, it's possible to make Gnus window layouts ``atomic'' -(@xref{Atomic Windows, , Atomic Windows, elisp, The GNU Emacs Lisp +(@pxref{Atomic Windows, , Atomic Windows, elisp, The GNU Emacs Lisp Reference Manual}) by setting @code{gnus-use-atomic-windows} to @code{t}. This will ensure that pop-up buffers (e.g. help or completion buffers), will appear below or to the side of the entire commit 32d6e07e210fea0c956797c0826732e7049eb247 Author: Lars Ingebrigtsen Date: Sun Sep 22 14:23:40 2019 +0200 Note that image-mode automatically rotates diff --git a/etc/NEWS b/etc/NEWS index 166c13363f..8a880e5b63 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2576,9 +2576,13 @@ left to higher-level functions. ** Image mode *** New library Exif. -An Exif library has been added that can parse JPEG files and -output data about creation times and orientation and the like. -'exif-parse' is the main interface function. +An Exif library has been added that can parse JPEG files and output +data about creation times and orientation and the like. +'exif-parse-file' and 'exif-parse-buffer' are the main interface +functions. + +*** 'image-mode' now uses this library to automatically rotate images +according to the orientation in the Exif data, if any. *** 'imagemagick-types-inhibit' disables using ImageMagick by default. 'image-mode' started using ImageMagick by default for all images commit 8542f666023931f85817f590926cc3e9bc992b68 Author: Lars Ingebrigtsen Date: Sun Sep 22 14:21:39 2019 +0200 Automatically rotate images in image-mode based on Exif data * lisp/image-mode.el (image-toggle-display-image): Get the orientation from the Exif data, if any. diff --git a/lisp/image-mode.el b/lisp/image-mode.el index fae928f4e6..aaec9026e5 100644 --- a/lisp/image-mode.el +++ b/lisp/image-mode.el @@ -39,6 +39,7 @@ ;;; Code: (require 'image) +(require 'exif) (eval-when-compile (require 'cl-lib)) ;;; Image mode window-info management. @@ -744,17 +745,25 @@ was inserted." (type (if (image--imagemagick-wanted-p filename) 'imagemagick (image-type file-or-data nil data-p))) - ;; :scale 1: If we do not set this, create-image will apply - ;; default scaling based on font size. - (image (if (not edges) + (inhibit-read-only t) + (buffer-undo-list t) + (modified (buffer-modified-p)) + props image) + + ;; Get the rotation data from the file, if any. + (setq image-transform-rotation + (or (exif-orientation + (ignore-error exif-error + (exif-parse-buffer))) + 0.0)) + + ;; :scale 1: If we do not set this, create-image will apply + ;; default scaling based on font size. + (setq image (if (not edges) (create-image file-or-data type data-p :scale 1) (create-image file-or-data type data-p :scale 1 :max-width (- (nth 2 edges) (nth 0 edges)) :max-height (- (nth 3 edges) (nth 1 edges))))) - (inhibit-read-only t) - (buffer-undo-list t) - (modified (buffer-modified-p)) - props) ;; Discard any stale image data before looking it up again. (image-flush image) commit 0c9a9d4219f2ada2b12cff4476a9d27bab40a862 Author: Lars Ingebrigtsen Date: Sun Sep 22 14:18:57 2019 +0200 Adjust the exif.el interface functions * lisp/image/exif.el (exif-parse-buffer): New function. (exif-orientation): Ditto. (exif-error): New error symbol, and adjust all error signalling to only use that signal. diff --git a/lisp/image/exif.el b/lisp/image/exif.el index 2ceafd5bfc..46f4d5c1ee 100644 --- a/lisp/image/exif.el +++ b/lisp/image/exif.el @@ -51,7 +51,7 @@ ;; in the directory, and then that number of entries follows, and then ;; an offset to the next IFD. -;; Usage: (exif-parse "test.jpg") => +;; Usage: (exif-parse-file "test.jpg") => ;; ((:tag 274 :tag-name orientation :format 3 :format-type short :value 1) ;; (:tag 282 :tag-name x-resolution :format 5 :format-type rational :value ;; (180 . 1)) @@ -75,25 +75,70 @@ (306 date-time)) "Alist of tag values and their names.") -(defun exif-parse (file) +(defconst exif--orientation + '((1 0 nil) + (2 0 t) + (3 180 nil) + (4 180 t) + (5 90 nil) + (6 90 t) + (7 270 nil) + (8 270 t)) + "Alist of Exif orientation codes. +These are mapped onto rotation values and whether the image is +mirrored or not.") + +(define-error 'exif-error "Invalid Exif data") + +(defun exif-parse-file (file) "Parse FILE (a JPEG file) and return the Exif data, if any. -The return value is a list of Exif items." - (when-let ((app1 (cdr (assq #xffe1 (exif--parse-jpeg file))))) - (exif--parse-exif-chunk app1))) +The return value is a list of Exif items. -(defun exif--parse-jpeg (file) +If the data is invalid, an `exif-error' is signalled." (with-temp-buffer (set-buffer-multibyte nil) (insert-file-contents-literally file) - (unless (= (exif--read-number-be 2) #xffd8) ; SOI (start of image) - (error "Not a valid JPEG file")) - (cl-loop for segment = (exif--read-number-be 2) - for size = (exif--read-number-be 2) - ;; Stop parsing when we get to SOS (start of stream); - ;; this is when the image itself starts, and there will - ;; be no more chunks of interest after that. - while (not (= segment #xffda)) - collect (cons segment (exif--read-chunk (- size 2)))))) + (exif-parse-buffer))) + +(defun exif-parse-buffer (&optional buffer) + "Parse BUFFER (which should be a JPEG file) and return the Exif data, if any. +The return value is a list of Exif items. + +If the data is invalid, an `exif-error' is signalled." + (setq buffer (or buffer (current-buffer))) + (with-current-buffer buffer + (if enable-multibyte-characters + (with-temp-buffer + (set-buffer-multibyte nil) + (let ((dest (current-buffer))) + (with-current-buffer buffer + (encode-coding-region (point-min) (point-max) + buffer-file-coding-system + dest)) + (when-let ((app1 (cdr (assq #xffe1 (exif--parse-jpeg))))) + (exif--parse-exif-chunk app1)))) + (when-let ((app1 (cdr (assq #xffe1 (exif--parse-jpeg))))) + (exif--parse-exif-chunk app1))))) + +(defun exif-orientation (exif) + "Return the orientation (in degrees) in EXIF. +If the orientation isn't present in the data, return nil." + (let ((code (plist-get (cl-find 'orientation exif + :key (lambda (e) + (plist-get e :tag-name))) + :value))) + (cadr (assq code exif--orientation)))) + +(defun exif--parse-jpeg () + (unless (= (exif--read-number-be 2) #xffd8) ; SOI (start of image) + (signal 'exif-error "Not a valid JPEG file")) + (cl-loop for segment = (exif--read-number-be 2) + for size = (exif--read-number-be 2) + ;; Stop parsing when we get to SOS (start of stream); + ;; this is when the image itself starts, and there will + ;; be no more chunks of interest after that. + while (not (= segment #xffda)) + collect (cons segment (exif--read-chunk (- size 2))))) (defun exif--parse-exif-chunk (data) (with-temp-buffer @@ -103,7 +148,7 @@ The return value is a list of Exif items." ;; The Exif data is in the APP1 JPEG chunk and starts with ;; "Exif\0\0". (unless (equal (exif--read-chunk 6) (string ?E ?x ?i ?f ?\0 ?\0)) - (error "Not a valid Exif chunk")) + (signal 'exif-error "Not a valid Exif chunk")) (delete-region (point-min) (point)) (let* ((endian-marker (exif--read-chunk 2)) (le (cond @@ -114,12 +159,15 @@ The return value is a list of Exif items." ((equal endian-marker "II") t) (t - (error "Invalid endian-ness %s" endian-marker))))) + (signal 'exif-error + (format "Invalid endian-ness %s" endian-marker)))))) ;; Another magical number. (unless (= (exif--read-number 2 le) #x002a) - (error "Invalid TIFF header length")) + (signal 'exif-error "Invalid TIFF header length")) (let ((offset (exif--read-number 2 le))) ;; Jump to where the IFD (directory) starts and parse it. + (when (> (1+ offset) (point-max)) + (signal 'exif-error "Invalid IFD (directory) offset")) (goto-char (1+ offset)) (exif--parse-directory le))))) @@ -145,31 +193,39 @@ The return value is a list of Exif items." for length = (* (exif--read-number 4 le) (cdr field-format)) for value = (exif--read-number 4 le) - collect (list :tag tag - :tag-name (cadr (assq tag exif-tag-alist)) - :format format - :format-type (car field-format) - :value (exif--process-value - (if (> length 4) - ;; If the length of the data - ;; is more than 4 bytes, then - ;; it's actually stored after - ;; this directory, and the - ;; value here is just the - ;; offset to use to find the - ;; data. - (buffer-substring - (1+ value) (+ (1+ value) length)) - ;; The value is stored - ;; directly in the directory. - value) - (car field-format) - le))))) + collect (list + :tag tag + :tag-name (cadr (assq tag exif-tag-alist)) + :format format + :format-type (car field-format) + :value (exif--process-value + (if (> length 4) + ;; If the length of the data is + ;; more than 4 bytes, then it's + ;; actually stored after this + ;; directory, and the value + ;; here is just the offset to + ;; use to find the data. + (progn + (when (> (+ (1+ value) length) + (point-max)) + (signal 'exif-error + "Premature end of file")) + (buffer-substring + (1+ value) + (+ (1+ value) length))) + ;; The value is stored directly + ;; in the directory. + value) + (car field-format) + le))))) (let ((next (exif--read-number 4 le))) (if (> next 0) ;; There's more than one directory; if so, jump to it and ;; keep parsing. (progn + (when (> (1+ next) (point-max)) + (signal 'exif-error "Invalid IFD (directory) next-offset")) (goto-char (1+ next)) (nconc dir (exif--parse-directory le))) ;; We've reached the end of the directories. @@ -190,6 +246,8 @@ The return value is a list of Exif items." (defun exif--read-chunk (bytes) "Return BYTES octets from the buffer and advance point that much." + (when (> (+ (point) bytes) (point-max)) + (signal 'exif-error "Premature end of file")) (prog1 (buffer-substring (point) (+ (point) bytes)) (forward-char bytes))) @@ -197,6 +255,8 @@ The return value is a list of Exif items." (defun exif--read-number-be (bytes) "Read BYTES octets from the buffer as a chunk of big-endian bytes. Advance point to after the read bytes." + (when (> (+ (point) bytes) (point-max)) + (signal 'exif-error "Premature end of file")) (let ((sum 0)) (dotimes (_ bytes) (setq sum (+ (* sum 256) (following-char))) @@ -206,6 +266,8 @@ Advance point to after the read bytes." (defun exif--read-number-le (bytes) "Read BYTES octets from the buffer as a chunk of low-endian bytes. Advance point to after the read bytes." + (when (> (+ (point) bytes) (point-max)) + (signal 'exif-error "Premature end of file")) (let ((sum 0)) (dotimes (i bytes) (setq sum (+ (* (following-char) (expt 256 i)) sum)) commit 2cc9c45e447bb8a89446a1cd6d3f247a4d01c822 Author: Andreas Schwab Date: Sat Sep 21 13:54:40 2019 +0200 Fix compilation with CHECK_STRUCTS * src/pdumper.c (dump_buffer): Update hash of struct buffer. diff --git a/src/pdumper.c b/src/pdumper.c index 2e382145be..195c5556ec 100644 --- a/src/pdumper.c +++ b/src/pdumper.c @@ -2769,7 +2769,7 @@ dump_hash_table (struct dump_context *ctx, static dump_off dump_buffer (struct dump_context *ctx, const struct buffer *in_buffer) { -#if CHECK_STRUCTS && !defined HASH_buffer_E34A11C6B9 +#if CHECK_STRUCTS && !defined HASH_buffer_9F2F522174 # error "buffer changed. See CHECK_STRUCTS comment in config.h." #endif struct buffer munged_buffer = *in_buffer;