1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00
Commit graph

140395 commits

Author SHA1 Message Date
Mattias Engdegård
41450a8ea5 Less bad permutation generator in regexp-opt test
* test/lisp/emacs-lisp/regexp-opt-tests.el
(regexp-opt-test--permutation, regexp-opt-test--factorial): Remove.
(regexp-opt-test--permutations): Rewrite.
2020-02-20 22:00:44 +01:00
Glenn Morris
398afbaf6f Merge from origin/emacs-27
9f08524748 (origin/emacs-27) Fix broken regexps
1d10885763 ; spelling and comment fix
614203bc80 ; make change-history-commit
28399e585e * Makefile.in (PREFERRED_BRANCH): Now emacs-27.
62afbc513a Fix bug when visiting euc-jp-encoded directories
a2c4eeeecd Clarify when fixnums are used.
4e5ac4b0c6 Reorder discussion of integer basics
f765aad28b Make OMake support slightly less expensive (bug#39595)
39410cfc5a Speed up 'msft' and 'watcom' compilation error regexps
96a269d045 Speed up 'maven' compilation error message regexp
efc9d4fe3e Amend c-backward-sws better to handle multiline block comm...
2020-02-20 07:50:30 -08:00
Mattias Engdegård
770f76f050 Remove subsumed repetitions in regexps
Make regexps smaller and faster by removing terms that are superfluous
by virtue of standing next to another term that matches more.  See
https://lists.gnu.org/archive/html/emacs-devel/2020-01/msg00949.html
for details.

* lisp/bs.el (bs--make-header-match-string):
* lisp/gnus/deuglify.el (gnus-outlook-repair-attribution-block):
* lisp/gnus/message.el (message-subject-trailing-was-ask-regexp)
(message-subject-trailing-was-regexp):
* lisp/informat.el (Info-validate):
* lisp/net/browse-url.el (browse-url-button-regexp):
* lisp/net/rcirc.el (rcirc-url-regexp):
* lisp/org/ob-core.el (org-babel-remove-result):
* lisp/org/ob-fortran.el (org-babel-fortran-ensure-main-wrap):
* lisp/org/org-capture.el (org-capture-set-target-location):
* lisp/org/org-table.el (org-table-expand-lhs-ranges):
* lisp/org/org.el (org-maybe-keyword-time-regexp, org-ts-regexp)
(org-ts-regexp-inactive, org-ts-regexp-both):
* lisp/play/gametree.el (gametree-hack-file-layout):
* lisp/progmodes/cc-mode.el (c-Java-defun-prompt-regexp):
* lisp/progmodes/idlw-shell.el (idlwave-shell-halting-error):
* lisp/progmodes/ruby-mode.el (ruby-mode-set-encoding):
* lisp/progmodes/verilog-mode.el (verilog-error-font-lock-keywords)
(verilog-verilint-off, verilog-case-indent-level)
(verilog-within-translate-off, verilog-start-translate-off)
(verilog-back-to-start-translate-off, verilog-end-translate-off)
(verilog-expand-dirnames):
* lisp/term.el (term-control-seq-regexp):
* lisp/textmodes/reftex-vars.el (featurep):
* lisp/url/url-gw.el (url-open-telnet):
* lisp/vc/ediff-ptch.el (ediff-context-diff-label-regexp):
* lisp/vc/pcvs-parse.el (cvs-parse-status):
* test/src/regex-emacs-tests.el (regex-tests-PCRE):
Remove subsumed repetitions.
* lisp/progmodes/sh-script.el (sh-syntax-propertize-function):
Simplify repetition of a repetition.
2020-02-20 16:05:18 +01:00
Mattias Engdegård
8dc4034ed6 Add and remove backslashes in regexps
These irregularities were found by relint; see
https://lists.gnu.org/archive/html/emacs-devel/2020-01/msg00949.html .

* doc/lispref/modes.texi (Example Major Modes):
* etc/srecode/el.srt:
* lisp/cedet/data-debug.el (data-debug-mode):
* lisp/cedet/semantic/grammar.el (semantic-grammar-mode):
* lisp/cedet/srecode/srt-mode.el (srecode-template-mode):
* lisp/comint.el (comint--unquote&requote-argument):
* lisp/emacs-lisp/lisp-mode.el (lisp-mode):
* lisp/gnus/mm-uu.el (mm-uu-type-alist):
* lisp/progmodes/cc-awk.el (c-awk-harmless-pattern-characters*):
* lisp/progmodes/cfengine.el (cfengine-common-settings):
* lisp/progmodes/cperl-mode.el (cperl-after-sub-regexp, cperl-init-faces):
* lisp/shell.el (shell-chdrive-regexp, shell--unquote&requote-argument):
* lisp/textmodes/tex-mode.el (tex-common-initialization):
Remove duplicated backslashes in character alternatives.

* lisp/emacs-lisp/lisp-mode.el (lisp-el-font-lock-keywords-2):
* lisp/progmodes/opascal.el (opascal--syntax-propertize):
* lisp/progmodes/pascal.el (pascal--syntax-propertize):
Remove backslashes escaping non-special characters.

* lisp/progmodes/fortran.el (fortran-font-lock-keywords-3): Escape '*'.
* lisp/progmodes/perl-mode.el (perl-syntax-propertize-function):
Escape '^'.
2020-02-20 16:03:30 +01:00
Mattias Engdegård
d950a61fc8 Remove Emacs 20 bug workaround in ebnf2ps (bug#39663)
* lisp/progmodes/ebnf2ps.el (ebnf-range-regexp): Remove.  All calls
replaced with a string equivalent to the returned value.
2020-02-20 15:52:23 +01:00
Lars Ingebrigtsen
17691ad2d3 shr comment typo fix
* lisp/net/shr.el (shr-parse-base): Comment typo fix.
2020-02-20 15:15:07 +01:00
Lars Ingebrigtsen
3ac8349517 Fix problem with degenerate <html base="."> specs in shr
* lisp/url/url-expand.el (url-expand-file-name): Don't bug out on
degenerate base/expander pairs (bug#39235).
2020-02-20 15:14:39 +01:00
Lars Ingebrigtsen
55ad194922 Fix <button>...</button> submit button rendering in eww
* lisp/net/eww.el (eww-form-submit): Use the contents of the
<button>...</button> for the string if there is no value
(bug#39326).
2020-02-20 14:44:16 +01:00
Kévin Le Gouguec
b7d5a64f40 Introduce face for <code> elements in shr
* lisp/net/shr.el (shr-tag-code): Don't use the `default' font,
because it has properties that will override surrounding elements
(like <a...>) (bug#39504).
2020-02-20 14:30:54 +01:00
Mattias Engdegård
9f08524748 Fix broken regexps
Incorrect escaping prevented these from working as intended.
Found by relint.

* lisp/progmodes/cc-defs.el (c-search-backward-char-property):
Add missing backslash.
* lisp/progmodes/simula.el (simula-mode):
Remove one backslash too many.
2020-02-20 11:25:25 +01:00
Paul Eggert
1d10885763 ; spelling and comment fix 2020-02-19 17:55:03 -08:00
Paul Eggert
614203bc80 ; make change-history-commit 2020-02-19 17:50:44 -08:00
Paul Eggert
28399e585e * Makefile.in (PREFERRED_BRANCH): Now emacs-27. 2020-02-19 17:41:24 -08:00
Paul Eggert
62afbc513a Fix bug when visiting euc-jp-encoded directories
Problem reported by Ken Sasaki (Bug#39672).
* src/fileio.c (Ffile_directory_p):
Encode filename before giving it to file_directory_p.
This fixes a typo introduced in
2019-09-18T02:18:14Z!eggert@cs.ucla.edu.
2020-02-19 17:22:27 -08:00
Paul Eggert
734eb7e457 Fix some file-modes races
* lisp/gnus/gnus-start.el (gnus-save-newsrc-file)
(gnus-slave-save-newsrc):
* lisp/gnus/gnus-uu.el (gnus-uu-initialize):
* lisp/gnus/mm-archive.el (mm-dissect-archive):
* lisp/gnus/mm-decode.el (mm-temp-files-delete)
(mm-display-external):
* lisp/image-dired.el (image-dired-create-thumb-1):
Use with-file-modes rather than setting the file modes later.
This fixes some race conditions where the file temporarily
has the wrong permissions.
2020-02-19 13:48:27 -08:00
Johan Bockgård
4b118bdca1 Fix search for ~/.Xdefaults-HOSTNAME (again)
* src/xrdb.c (get_environ_db): Fix typo when handling
~/.Xdefaults-HOSTNAME.
2020-02-19 20:41:18 +01:00
Jeremy Compostella
e1e1bd8f85 Fix conversion of text/html->multipart/related
* lisp/gnus/mml.el (mml-expand-all-html-into-multipart-related):
New function (bug#39230).
(mml-generate-mime): Use it to expand all HTML parts, no matter
where in the MIME tree.
2020-02-19 14:51:43 +01:00
Masahiro Nakamura
b3de1302ca Fix working text related issues on NS (Bug#38851)
* src/keyboard.c (read_char): Prevent redsiplay right after
ns-unput-working-text event.
* src/nsterm.m ([EmacsView insertText:]): Partially revert commit
ba04217.
([EmacsView firstRectForCharacterRange:]): Fix candidate window
position when cursor is on echoarea.
([EmacsView mouseDown:])
([EmacsView windowDidResignKey:]): Don't delete working text.
2020-02-19 11:07:58 +00:00
Alan Third
1a75e8b7e0 Fix horizontal bit shifting
* src/nsterm.m ([EmacsView copyRect:to:]): Calculate the horizontal
difference instead of just the vertical.
([EmacsView updateLayer]): Fix NSTRACE message.
2020-02-19 11:07:44 +00:00
Paul Eggert
52dbd70f0e * doc/misc/texinfo.tex: Update from Gnulib. 2020-02-18 17:51:28 -08:00
Juri Linkov
2b04ca05ad Support state changing VC operations in dired-mode on files (bug#34949)
* lisp/vc/vc.el (vc-deduce-fileset): Don't error out when observer is nil.
(vc-dired-deduce-fileset): Add optional args 'state-model-only-files'
and 'observer'.  Check that all files are in a consistent state
when state-model-only-files is non-nil.  Error out on directories.

* lisp/vc/vc-dispatcher.el (vc-dispatcher-browsing): Check dired-mode
for derived-mode-p.
2020-02-19 01:35:03 +02:00
Stefan Monnier
0c0fa1d5fd * lisp/wdired.el (wdired-next-line, wdired-previous-line): Preserve column 2020-02-18 12:47:32 -05:00
Paul Eggert
a2c4eeeecd Clarify when fixnums are used.
* doc/lispref/numbers.texi (Integer Basics): Clarify.
Based on a suggestion by Noam Postavsky (Bug#39557#32).
2020-02-17 13:54:36 -08:00
Paul Eggert
4e5ac4b0c6 Reorder discussion of integer basics
* doc/lispref/numbers.texi (Integer Basics): Put the fixnum/bignum
discussion at the end of the section, not at the start (Bug#39557).
2020-02-17 13:37:14 -08:00
Paul Eggert
121f9bb14a Avoid unlikely load-average bug
* src/fns.c (Fload_average): Do not crash or return nonsense
if the load average exceeds most-positive-fixnum/100 (Bug#39577).
2020-02-17 12:44:29 -08:00
Mattias Engdegård
f765aad28b Make OMake support slightly less expensive (bug#39595)
When run with -p or -P, OMake regurgitates error messages that
prevented further progress, indented by 6 spaces.  Use that fact
to ameliorate the modification done to other error message regexps.

* lisp/progmodes/compile.el (compilation-parse-errors):
When 'omake' is enabled, allow error messages to be indented by 0 or 6
spaces instead of any number of spaces, to avoid pathological
behaviour.
(compilation-error-regexp-alist-alist): Anchor the 'omake' pattern to
bol for performance.  Repair the 'ruby-Test::Unit' pattern, which
relied on the previously over-generous 'omake' hack.
* etc/compilation.txt (OMake): Add examples.
* test/lisp/progmodes/compile-tests.el (compile-tests--test-regexps-data)
(compile-test-error-regexps): Add test for OMake (indented error).
2020-02-17 11:23:41 +01:00
Mattias Engdegård
39410cfc5a Speed up 'msft' and 'watcom' compilation error regexps
They have similar structure, and both suffer from being able to
match leading spaces in multiple ways which leads to bad performance
when backtracking (bug#39595).

* lisp/progmodes/compile.el (compilation-error-regexp-alist-alist):
Improved 'msft' and 'watcom' regexps.
2020-02-17 11:23:41 +01:00
Mattias Engdegård
96a269d045 Speed up 'maven' compilation error message regexp
Anchor the regexp at line-start to prevent quadratic behaviour when
it doesn't match (bug#39595).  It's unclear whether the type tag, like
[ERROR], is always present; we keep it optional just in case.

* lisp/progmodes/compile.el (compilation-error-regexp-alist-alist):
Rewrite 'maven' regexp, using rx for clarity.
* etc/compilation.txt (maven): More examples.
* test/lisp/progmodes/compile-tests.el
(compile-tests--test-regexps-data): No leading spaces; they seems to
stem from a misunderstanding in bug#11517.
2020-02-17 11:23:41 +01:00
Paul Eggert
556cc727e5 Improve C-h C-h bug fix
* src/lread.c (read1): Guard against two 'struct Lisp_Vector *'
pointers differing only in their most significant bit.  Problem
reported by Pip Cet (Bug#39529#22).
2020-02-16 11:37:07 -08:00
Alan Mackenzie
efc9d4fe3e Amend c-backward-sws better to handle multiline block comments
In particular, multiline comments lacking escaped newlines.

* lisp/progmodes/cc-engine.el (c-backward-sws): Whilst searching backward for
a putative beginning of macro, move back over block comments whose innards
lack escaped newlines.
2020-02-16 17:46:02 +00:00
Glenn Morris
df9da9445e * src/lread.c (read1): Fix int/Lisp_Object mix up.
Found by --enable-check-lisp-object-type.
2020-02-16 09:11:28 -08:00
Glenn Morris
f633e014ac Merge from origin/emacs-27
7ceb45f61f (origin/emacs-27) Reformulate c-end-of-macro, handling mul...
888ffd960c Fix unexec failure on macOS 10.15.4
b392c9f365 Fix 'reverse-region' when less than one line is in region
7448834f73 Correct default regexp in 'package-menu-hide-package'
faada7ca42 Remove obsolete menu entry "Redisplay buffer"
78d76cd93c Remove redundant 'msft' compilation error rule (bug#39595)
75a9eee8b8 ; * src/editfns.c (Fbuffer_size): Tiny clarification.
4d8d25d641 * doc/lispref/variables.texi (special-variable-p): Clarify...
9f6a4bbcc9 Remove the optional KEEP-ORDER argument to regexp-opt
d1e8ce8bb6 Make after-change-functions called from call-process get t...

# Conflicts:
#	etc/NEWS
2020-02-16 07:50:36 -08:00
Alan Mackenzie
7ceb45f61f Reformulate c-end-of-macro, handling multiline block comments better
* lisp/progmodes/cc-langs.el (c-last-open-c-comment-start-on-line-re): Comment
out.
(c-open-c-comment-on-logical-line-re): Remove.

* lisp/progmodes/cc-engine.el (c-end-of-macro): Handle multiline block
comments lacking escaped newlines using parse-partial-sexp rather than the
former variables removed from cc-langs.el.
2020-02-16 12:14:41 +00:00
YAMAMOTO Mitsuharu
888ffd960c Fix unexec failure on macOS 10.15.4
* src/unexmacosx.c (unexec_regions_merge): Align region start addresses to
page boundaries and then merge regions.
2020-02-16 09:50:26 +09:00
Paul Eggert
3480071dfa Fix C-h C-h bug due to mutating a hash key
Problem reported by Federico Tedin (Bug#39529).
The problem was that dumping uses a hash table based on 'equal'
when purecopying compiled objects, but then modifies the compiled
objects while they are keys in the table.  This no-no was uncovered
by the sxhash fixes in 2020-01-07T19:23:11Z!eggert@cs.ucla.edu.
Eli Zaretski pinpointed the patch that triggered the bug.
* src/lread.c (read1): When reading a compiled object, replace
its docstring with a unique negative integer instead of with 0,
so that purecopy doesn’t unify it with some other compiled object
that happens to have the same Lisp code.
2020-02-15 15:18:28 -08:00
Glenn Morris
ccb15ada75 Remove another test for deleted lread feature
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-tests--old-style-backquotes): Remove.
2020-02-15 09:11:34 -08:00
Eli Zaretskii
b392c9f365 Fix 'reverse-region' when less than one line is in region
* lisp/sort.el (reverse-region): Signal a user-error if the region
includes less than one full line, thus avoiding an inadvertent
deletion of text following the current line.  Fix the doc string.
Fix comments to start with a capital letter.  (Bug#39376)
2020-02-15 10:47:08 +02:00
Pieter van Oostrum
7448834f73 Correct default regexp in 'package-menu-hide-package'
* lisp/emacs-lisp/package.el (package-menu-mode-menu): Correct default
regexp, so it only selects the package at point.
(Bug#39436)
2020-02-15 10:23:21 +02:00
Pieter van Oostrum
faada7ca42 Remove obsolete menu entry "Redisplay buffer"
* lisp/emacs-lisp/package.el (package-menu-mode-menu): Remove obsolete
menu entry "Redisplay buffer".
(package-menu-mode-menu): Menu entry "Refresh Package List":
make the doc string more accurate.
(Bug#39436)
2020-02-15 10:15:27 +02:00
Eli Zaretskii
b519d515ba ; * etc/NEWS: Fix wording in a recently added entry. 2020-02-15 09:28:45 +02:00
Mark Oteiza
3843721c6e Fix typos
* src/lcms.c (lcms-xyz->jch, lcms-jch->xyz): Swap first line of docstrings.
2020-02-14 18:01:11 -05:00
Stefan Monnier
333cc6a037 * etc/NEWS: Improve last change 2020-02-14 16:12:28 -05:00
Eric Abrahamsen
61216e4ac2 When searching a topic in Gnus, search all topic's groups
Bug#39515

* lisp/gnus/nnir.el (gnus-group-make-nnir-group): Bring the code in
line with the documentation, which says that all topic groups will be
searched, even if they're not visible.
2020-02-14 11:56:58 -08:00
Mattias Engdegård
78d76cd93c Remove redundant 'msft' compilation error rule (bug#39595)
When the 'msft' rule was moved and modified, the old copy was left
in place by mistake.

* lisp/progmodes/compile.el (compilation-error-regexp-alist-alist):
Remove old rule.
2020-02-14 20:25:57 +01:00
Glenn Morris
a9e7ae39ce Remove lread tests for a feature that was deleted
* test/src/lread-tests.el (lread-tests--old-style-backquotes)
(lread-tests--force-new-style-backquotes): Remove.
2020-02-14 11:10:55 -08:00
Stefan Monnier
2e81e5733d * src/lread.c: Remove old-style backquotes support
(new_backquote_flag): Delete variable.
(load_error_old_style_backquotes): Delete function.
(force_new_style_backquotes): Delete variable.
(read_internal_start): Don't obey it any more.
2020-02-14 11:18:00 -05:00
Stefan Monnier
d737e497a8 * lisp/gnus/nnmaildir.el: Fix O(n^2) problem when leaving a group
Use lexical-binding.

(nnmaildir-close-group): Use a hash-table rather than a list to keep
track of the files we have seen.

* lisp/gnus/nnheader.el (nnheader-parse-naked-head):
Use make-full-mail-header.
2020-02-14 11:05:57 -05:00
Stefan Monnier
32f0149266 * lisp/simple.el (undo): Use undo--last-change-was-undo-p 2020-02-14 10:52:58 -05:00
Michael Albinus
bbe13596b1 Fix Tramp tests for MS Windows
* test/lisp/net/tramp-tests.el (tramp-test29-start-file-process)
(tramp-test30-make-process): Improve for MS-Windows.
2020-02-14 14:50:55 +01:00
Mark Oteiza
b80c4b43dd Add an appropriate error for reading bad JSON arrays
* lisp/json.el (json-array-format): New error.
(json-read-array): Use it.
2020-02-13 19:57:44 -05:00