diff options
| author | Paul Eggert | 2019-03-19 18:45:17 -0700 |
|---|---|---|
| committer | Paul Eggert | 2019-03-19 18:47:53 -0700 |
| commit | e14c0d748efe35afc653151ff18c4dd93dcc456e (patch) | |
| tree | f31050be99133f3466413728c2c948ab7914fcb7 /lisp/textmodes | |
| parent | b2dd61ffb0b4efc0419f4b5cbe279c2700b549e8 (diff) | |
| download | emacs-e14c0d748efe35afc653151ff18c4dd93dcc456e.tar.gz emacs-e14c0d748efe35afc653151ff18c4dd93dcc456e.zip | |
More minor regex cleanup
Problems reported by Mattias EngdegÄrd in:
https://lists.gnu.org/r/emacs-devel/2019-03/msg00643.html
plus a few others that I noticed.
* lisp/auth-source-pass.el (auth-source-pass--parse-data):
* lisp/org/org-datetree.el (org-datetree--find-create):
* lisp/org/org-pcomplete.el (org-thing-at-point):
* lisp/progmodes/js.el (js--end-of-do-while-loop-p):
* lisp/textmodes/sgml-mode.el:
(sgml-electric-tag-pair-before-change-function):
* lisp/textmodes/texnfo-upd.el (texinfo-menu-copy-old-description):
* lisp/url/url-http.el (url-http-parse-response):
Fix regular expression and similar syntax.
Diffstat (limited to 'lisp/textmodes')
| -rw-r--r-- | lisp/textmodes/sgml-mode.el | 7 | ||||
| -rw-r--r-- | lisp/textmodes/texnfo-upd.el | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el index e49144e2900..9e3be99af14 100644 --- a/lisp/textmodes/sgml-mode.el +++ b/lisp/textmodes/sgml-mode.el | |||
| @@ -894,7 +894,7 @@ Return non-nil if we skipped over matched tags." | |||
| 894 | (condition-case err | 894 | (condition-case err |
| 895 | (save-excursion | 895 | (save-excursion |
| 896 | (goto-char end) | 896 | (goto-char end) |
| 897 | (skip-chars-backward "[:alnum:]-_.:") | 897 | (skip-chars-backward "-[:alnum:]_.:") |
| 898 | (if (and ;; (<= (point) beg) ; This poses problems for downcase-word. | 898 | (if (and ;; (<= (point) beg) ; This poses problems for downcase-word. |
| 899 | (or (eq (char-before) ?<) | 899 | (or (eq (char-before) ?<) |
| 900 | (and (eq (char-before) ?/) | 900 | (and (eq (char-before) ?/) |
| @@ -902,7 +902,7 @@ Return non-nil if we skipped over matched tags." | |||
| 902 | (null (get-char-property (point) 'text-clones))) | 902 | (null (get-char-property (point) 'text-clones))) |
| 903 | (let* ((endp (eq (char-before) ?/)) | 903 | (let* ((endp (eq (char-before) ?/)) |
| 904 | (cl-start (point)) | 904 | (cl-start (point)) |
| 905 | (cl-end (progn (skip-chars-forward "[:alnum:]-_.:") (point))) | 905 | (cl-end (progn (skip-chars-forward "-[:alnum:]_.:") (point))) |
| 906 | (match | 906 | (match |
| 907 | (if endp | 907 | (if endp |
| 908 | (when (sgml-skip-tag-backward 1) (forward-char 1) t) | 908 | (when (sgml-skip-tag-backward 1) (forward-char 1) t) |
| @@ -919,7 +919,8 @@ Return non-nil if we skipped over matched tags." | |||
| 919 | (equal (buffer-substring cl-start cl-end) | 919 | (equal (buffer-substring cl-start cl-end) |
| 920 | (buffer-substring (point) | 920 | (buffer-substring (point) |
| 921 | (save-excursion | 921 | (save-excursion |
| 922 | (skip-chars-forward "[:alnum:]-_.:") | 922 | (skip-chars-forward |
| 923 | "-[:alnum:]_.:") | ||
| 923 | (point)))) | 924 | (point)))) |
| 924 | (or (not endp) (eq (char-after cl-end) ?>))) | 925 | (or (not endp) (eq (char-after cl-end) ?>))) |
| 925 | (when clones | 926 | (when clones |
diff --git a/lisp/textmodes/texnfo-upd.el b/lisp/textmodes/texnfo-upd.el index 8c6e23eae4a..e960e992a89 100644 --- a/lisp/textmodes/texnfo-upd.el +++ b/lisp/textmodes/texnfo-upd.el | |||
| @@ -642,7 +642,7 @@ appears in the texinfo file." | |||
| 642 | "Return description field of old menu line as string. | 642 | "Return description field of old menu line as string. |
| 643 | Point must be located just after the node name. Point left before description. | 643 | Point must be located just after the node name. Point left before description. |
| 644 | Single argument, END-OF-MENU, is position limiting search." | 644 | Single argument, END-OF-MENU, is position limiting search." |
| 645 | (skip-chars-forward "[:.,\t\n ]+") | 645 | (skip-chars-forward ":.,\t\n ") |
| 646 | ;; don't copy a carriage return at line beginning with asterisk! | 646 | ;; don't copy a carriage return at line beginning with asterisk! |
| 647 | ;; don't copy @detailmenu or @end menu or @ignore as descriptions! | 647 | ;; don't copy @detailmenu or @end menu or @ignore as descriptions! |
| 648 | ;; do copy a description that begins with an `@'! | 648 | ;; do copy a description that begins with an `@'! |