diff options
| author | Mattias EngdegÄrd | 2020-04-16 11:04:24 +0200 |
|---|---|---|
| committer | Mattias EngdegÄrd | 2020-04-16 12:14:38 +0200 |
| commit | 905c0a13f7929298cb36151f46dbef03f7bdcbe4 (patch) | |
| tree | b2adb12f5e6810bf3784628efae69828bba3c464 /lisp/vc | |
| parent | 01436fddfb2587271391e72b7eaa6c5c541b46d8 (diff) | |
| download | emacs-905c0a13f7929298cb36151f46dbef03f7bdcbe4.tar.gz emacs-905c0a13f7929298cb36151f46dbef03f7bdcbe4.zip | |
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.
Diffstat (limited to 'lisp/vc')
| -rw-r--r-- | lisp/vc/diff-mode.el | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index da2d5ed50e4..d194d6c0a0e 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el | |||
| @@ -484,7 +484,7 @@ and the face `diff-added' for added lines.") | |||
| 484 | ;; Prefer second name as first is most likely to be a backup or | 484 | ;; Prefer second name as first is most likely to be a backup or |
| 485 | ;; version-control name. The [\t\n] at the end of the unidiff pattern | 485 | ;; version-control name. The [\t\n] at the end of the unidiff pattern |
| 486 | ;; catches Debian source diff files (which lack the trailing date). | 486 | ;; catches Debian source diff files (which lack the trailing date). |
| 487 | '((nil "\\+\\+\\+\\ \\([^\t\n]+\\)[\t\n]" 1) ; unidiffs | 487 | '((nil "\\+\\+\\+ \\([^\t\n]+\\)[\t\n]" 1) ; unidiffs |
| 488 | (nil "^--- \\([^\t\n]+\\)\t.*\n\\*" 1))) ; context diffs | 488 | (nil "^--- \\([^\t\n]+\\)\t.*\n\\*" 1))) ; context diffs |
| 489 | 489 | ||
| 490 | ;;;; | 490 | ;;;; |