Commit graph

21 commits

Author SHA1 Message Date
Stefan Kangas
8aca659bd1 Use lexical-binding in puny.el and add more tests
* lisp/net/puny.el: Use lexical-binding.
* test/lisp/net/puny-tests.el (puny-test-encode-domain)
(puny-test-decode-domain, puny-highly-restrictive-domain-p): New
tests.
2020-04-28 18:14:28 +02:00
Mattias Engdegård
905c0a13f7 Fix bugs, inefficiencies and bad style in regexps
Found by relint.  See discussion at
https://lists.gnu.org/archive/html/emacs-devel/2020-04/msg00265.html

* lisp/org/org-table.el (org-table-finish-edit-field):
* lisp/arc-mode.el (archive-rar-summarize):
Avoid wrapped subsumption in repeated sequences.
* lisp/erc/erc-dcc.el (erc-dcc-ctcp-query-send-regexp): Replace
inefficient repeated empty-matching expression with a plain greedy
form.
(erc-dcc-handle-ctcp-send): Adjust group numbers.
* lisp/net/puny.el (puny-encode-domain): Fix fast-path shortcut
pattern so that it actually works as intended.
* lisp/progmodes/gdb-mi.el (gdb-control-commands-regexp):
* lisp/vc/diff-mode.el (diff-imenu-generic-expression):
Remove superfluous backslashes.
* lisp/progmodes/scheme.el (scheme-imenu-generic-expression):
Correct confused definition-matching pattern which would match more
than intended.
* lisp/textmodes/sgml-mode.el (sgml-tag-name-re): Avoid inefficient
matching by using the fact that the first character cannot match the
last char of sgml-name-re.
2020-04-16 12:14:38 +02:00
Paul Eggert
365e01cc9f Update copyright year to 2020
Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
2020-01-01 00:59:52 +00:00
Lars Ingebrigtsen
19f72110fc Protect against invalid punycode
* lisp/net/puny.el (puny-decode-string): Protect against invalid
punycode.
2019-10-20 09:40:11 +02:00
Paul Eggert
ba809612c0 Merge from origin/emacs-26
2fcf2df Fix copyright years by hand
26bed8b Update copyright year to 2019
2814292 Fix value of default frame height.  (Bug#33921)
2018-12-31 17:57:29 -08:00
Paul Eggert
26bed8ba10 Update copyright year to 2019
Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
2019-01-01 01:01:13 +00:00
Glenn Morris
1c7db8aa30 Explicitly require cl-lib where needed
Rather than relying on the byte-compiler happening to use it.
* lisp/completion.el, lisp/ffap.el, lisp/loadhist.el:
* lisp/userlock.el, lisp/emacs-lisp/debug.el, lisp/emacs-lisp/rx.el:
* lisp/emacs-lisp/testcover.el, lisp/mail/rfc2231.el:
* lisp/net/newst-treeview.el, lisp/net/puny.el:
* lisp/net/tramp-archive.el, lisp/net/tramp-gvfs.el:
* lisp/net/tramp-sh.el, lisp/net/tramp-smb.el, lisp/org/org-ctags.el:
* lisp/org/org-macs.el, lisp/progmodes/grep.el:
* lisp/progmodes/perl-mode.el, lisp/progmodes/ruby-mode.el:
* lisp/textmodes/dns-mode.el, lisp/textmodes/mhtml-mode.el:
* lisp/vc/pcvs-parse.el: Explicitly require cl-lib as needed.
2018-03-16 20:41:17 -04:00
Paul Eggert
5c7dd8a783 Update copyright year to 2018
Run admin/update-copyright.
2018-01-01 00:57:59 -08:00
Paul Eggert
bc511a64f6 Prefer HTTPS to FTP and HTTP in documentation
Most of this change is to boilerplate commentary such as license URLs.
This change was prompted by ftp://ftp.gnu.org's going-away party,
planned for November.  Change these FTP URLs to https://ftp.gnu.org
instead.  Make similar changes for URLs to other organizations moving
away from FTP.  Also, change HTTP to HTTPS for URLs to gnu.org and
fsf.org when this works, as this will further help defend against
man-in-the-middle attacks (for this part I omitted the MS-DOS and
MS-Windows sources and the test tarballs to keep the workload down).
HTTPS is not fully working to lists.gnu.org so I left those URLs alone
for now.
2017-09-13 15:54:37 -07:00
Glenn Morris
8c1e16bee4 Small puny.el fix
* lisp/net/puny.el (puny-decode-string-internal):
Handle strings with no ascii parts.  (Bug#23688)
2017-03-01 20:35:41 -05:00
Paul Eggert
e6a782ee1a Update copyright year to 2017 in master
Run admin/update-copyright in the master branch.  This fixes files
that were not already fixed in the emacs-25 branch before it was
merged here.
2017-01-01 01:48:59 -08:00
Glenn Morris
efa968e9bb ; Add 2016 to copyright years for files not in emacs-25 branch 2016-01-12 16:20:00 -05:00
Paul Eggert
61e83e902b Spelling fixes 2016-01-04 14:47:01 -08:00
Lars Magne Ingebrigtsen
7c343eeaac New function `puny-highly-restrictive-domain-p'
* lisp/net/puny.el (puny-highly-restrictive-string-p): Rename.
(puny-highly-restrictive-domain-p): New function.
2015-12-30 10:10:20 +01:00
Lars Ingebrigtsen
d259328fb8 Further Unicode restrictive fixups
* puny.el (puny-highly-restrictive-p): Include the extra
identifier characters from table 3.
2015-12-29 17:46:00 +01:00
Lars Ingebrigtsen
d181366dc3 Add a new function to say whether a string is restrictive
* puny.el (puny-highly-restrictive-p): New function.
2015-12-29 12:40:55 +01:00
Lars Ingebrigtsen
341feb3a26 Fix puny-encoding all-non-ASCII domains
* puny.el (puny-encode-string): Fix the all-non-ASCII encoding case.
2015-12-29 00:07:50 +01:00
Lars Ingebrigtsen
0e99ccb321 Fix punycode short circuit logic
* puny.el (puny-encode-domain): Fix short-circuit logic.
2015-12-28 19:13:51 +01:00
Lars Ingebrigtsen
91ef47353d IDNA speed up
* puny.el (puny-encode-domain): Make the common non-IDNA case faster
2015-12-28 18:47:51 +01:00
Lars Ingebrigtsen
1f11b33a78 Add IDNA domain encode/decode functions
* puny.el (puny-decode-domain): New function.
(puny-encode-domain): Ditto.
(puny-decode-digit): Fix digit decoding error.
2015-12-28 18:41:13 +01:00
Lars Ingebrigtsen
ad1f24f96b Rename idna.el to puny.el
* puny.el: Renamed from idna.el to avoid name collisions with
the external idna.el library.
2015-12-28 18:21:20 +01:00
Renamed from lisp/net/idna.el (Browse further)