diff options
| author | Mattias EngdegÄrd | 2020-02-20 15:45:44 +0100 |
|---|---|---|
| committer | Mattias EngdegÄrd | 2020-02-20 16:05:18 +0100 |
| commit | 770f76f050376bbd77a3cc8cf44db57cf855a27c (patch) | |
| tree | 9cfc115c6130b67939865c7e56d92075eff6484a /lisp/gnus | |
| parent | 8dc4034ed6f86455c294f22a3d345b00cd4aa143 (diff) | |
| download | emacs-770f76f050376bbd77a3cc8cf44db57cf855a27c.tar.gz emacs-770f76f050376bbd77a3cc8cf44db57cf855a27c.zip | |
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.
Diffstat (limited to 'lisp/gnus')
| -rw-r--r-- | lisp/gnus/deuglify.el | 4 | ||||
| -rw-r--r-- | lisp/gnus/message.el | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lisp/gnus/deuglify.el b/lisp/gnus/deuglify.el index 0ce4a7d2928..647f643c962 100644 --- a/lisp/gnus/deuglify.el +++ b/lisp/gnus/deuglify.el | |||
| @@ -403,9 +403,9 @@ NODISPLAY is non-nil, don't redisplay the article buffer." | |||
| 403 | (gnus-with-article-buffer | 403 | (gnus-with-article-buffer |
| 404 | (article-goto-body) | 404 | (article-goto-body) |
| 405 | (when (re-search-forward | 405 | (when (re-search-forward |
| 406 | (concat "^[" cite-marks " \t]*--* ?[^-]+ [^-]+ ?--*\\s *\n" | 406 | (concat "^[" cite-marks " \t]*--*[^-]+ [^-]+--*\\s *\n" |
| 407 | "[^\n:]+:[ \t]*\\([^\n]+\\)\n" | 407 | "[^\n:]+:[ \t]*\\([^\n]+\\)\n" |
| 408 | "\\([^\n:]+:[ \t]*[^\n]+\n\\)+") | 408 | "\\([^\n:]+:[^\n]+\n\\)+") |
| 409 | nil t) | 409 | nil t) |
| 410 | (gnus-kill-all-overlays) | 410 | (gnus-kill-all-overlays) |
| 411 | (replace-match "\\1 wrote:\n") | 411 | (replace-match "\\1 wrote:\n") |
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 3abeec7e2f2..f1ace0eeb2e 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el | |||
| @@ -322,7 +322,7 @@ used." | |||
| 322 | :group 'message-various) | 322 | :group 'message-various) |
| 323 | 323 | ||
| 324 | (defcustom message-subject-trailing-was-ask-regexp | 324 | (defcustom message-subject-trailing-was-ask-regexp |
| 325 | "[ \t]*\\([[(]+[Ww][Aa][Ss]:?[ \t]*.*[])]+\\)" | 325 | "[ \t]*\\([[(]+[Ww][Aa][Ss].*[])]+\\)" |
| 326 | "Regexp matching \"(was: <old subject>)\" in the subject line. | 326 | "Regexp matching \"(was: <old subject>)\" in the subject line. |
| 327 | 327 | ||
| 328 | The function `message-strip-subject-trailing-was' uses this regexp if | 328 | The function `message-strip-subject-trailing-was' uses this regexp if |
| @@ -337,7 +337,7 @@ It is okay to create some false positives here, as the user is asked." | |||
| 337 | :type 'regexp) | 337 | :type 'regexp) |
| 338 | 338 | ||
| 339 | (defcustom message-subject-trailing-was-regexp | 339 | (defcustom message-subject-trailing-was-regexp |
| 340 | "[ \t]*\\((*[Ww][Aa][Ss]:[ \t]*.*)\\)" | 340 | "[ \t]*\\((*[Ww][Aa][Ss]:.*)\\)" |
| 341 | "Regexp matching \"(was: <old subject>)\" in the subject line. | 341 | "Regexp matching \"(was: <old subject>)\" in the subject line. |
| 342 | 342 | ||
| 343 | If `message-subject-trailing-was-query' is set to t, the subject is | 343 | If `message-subject-trailing-was-query' is set to t, the subject is |