From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: Scan of regexps in Emacs (March 17) Date: Mon, 18 Mar 2019 18:21:18 -0700 Organization: UCLA Computer Science Department Message-ID: <5363970c-3207-1bb4-8b30-74a7d12277cc@cs.ucla.edu> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------9EB61C9AA2BCB9DC2D39B4EA" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="62610"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 Cc: emacs-devel To: =?UTF-8?Q?Mattias_Engdeg=c3=a5rd?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 19 02:22:36 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h63Sc-000G6K-Mj for ged-emacs-devel@m.gmane.org; Tue, 19 Mar 2019 02:22:35 +0100 Original-Received: from localhost ([127.0.0.1]:49863 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h63Sb-00055R-NZ for ged-emacs-devel@m.gmane.org; Mon, 18 Mar 2019 21:22:33 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:43689) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h63Re-00053p-6u for emacs-devel@gnu.org; Mon, 18 Mar 2019 21:21:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h63RX-00029V-LA for emacs-devel@gnu.org; Mon, 18 Mar 2019 21:21:32 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:47470) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h63RU-00024a-I5 for emacs-devel@gnu.org; Mon, 18 Mar 2019 21:21:26 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id D168B1615E2; Mon, 18 Mar 2019 18:21:21 -0700 (PDT) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id t-5mYBz3fE6o; Mon, 18 Mar 2019 18:21:18 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 998B71615F2; Mon, 18 Mar 2019 18:21:18 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id P6dgiMgrUEpV; Mon, 18 Mar 2019 18:21:18 -0700 (PDT) Original-Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 61EB71615ED; Mon, 18 Mar 2019 18:21:18 -0700 (PDT) Openpgp: preference=signencrypt Autocrypt: addr=eggert@cs.ucla.edu; prefer-encrypt=mutual; keydata= xsFNBEyAcmQBEADAAyH2xoTu7ppG5D3a8FMZEon74dCvc4+q1XA2J2tBy2pwaTqfhpxxdGA9 Jj50UJ3PD4bSUEgN8tLZ0san47l5XTAFLi2456ciSl5m8sKaHlGdt9XmAAtmXqeZVIYX/UFS 96fDzf4xhEmm/y7LbYEPQdUdxu47xA5KhTYp5bltF3WYDz1Ygd7gx07Auwp7iw7eNvnoDTAl KAl8KYDZzbDNCQGEbpY3efZIvPdeI+FWQN4W+kghy+P6au6PrIIhYraeua7XDdb2LS1en3Ss mE3QjqfRqI/A2ue8JMwsvXe/WK38Ezs6x74iTaqI3AFH6ilAhDqpMnd/msSESNFt76DiO1ZK QMr9amVPknjfPmJISqdhgB1DlEdw34sROf6V8mZw0xfqT6PKE46LcFefzs0kbg4GORf8vjG2 Sf1tk5eU8MBiyN/bZ03bKNjNYMpODDQQwuP84kYLkX2wBxxMAhBxwbDVZudzxDZJ1C2VXujC OJVxq2kljBM9ETYuUGqd75AW2LXrLw6+MuIsHFAYAgRr7+KcwDgBAfwhPBYX34nSSiHlmLC+ KaHLeCLF5ZI2vKm3HEeCTtlOg7xZEONgwzL+fdKo+D6SoC8RRxJKs8a3sVfI4t6CnrQzvJbB n6gxdgCu5i29J1QCYrCYvql2UyFPAK+do99/1jOXT4m2836j1wARAQABzSBQYXVsIEVnZ2Vy dCA8ZWdnZXJ0QGNzLnVjbGEuZWR1PsLBfgQTAQIAKAUCTIByZAIbAwUJEswDAAYLCQgHAwIG FQgCCQoLBBYCAwECH In-Reply-To: Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 131.179.128.68 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:234348 Archived-At: This is a multi-part message in MIME format. --------------9EB61C9AA2BCB9DC2D39B4EA Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Thanks for doing that. I fixed all the regular expressions I could easily fix, by installing the attached patch into master. I saw two false alarms, both in lisp/org/org-datetree.el. Both are of the form (re-search-forward (format "[chars%%]+" ...) nil t), in which both '%' characters are needed. Perhaps you could tweak the trawler to not report these? The remaining unfixed issues are all in lisp/mail/footnote.el's footnote-hebrew-numeric-regex, where Eli's expertise would help. I'm attaching these unfixed issues in mail-extr.txt. I assume this was a complete trawl, so that I can ignore the earlier scans you emailed (I got behind in looking into them). If not, please let me know. --------------9EB61C9AA2BCB9DC2D39B4EA Content-Type: text/x-patch; name="0001-Fix-more-regular-expression-typos.patch" Content-Disposition: attachment; filename="0001-Fix-more-regular-expression-typos.patch" Content-Transfer-Encoding: quoted-printable >From 8887f1ebff2eb2768dafe24a905ff7d08cbf96da Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 18 Mar 2019 17:02:01 -0700 Subject: [PATCH] Fix more regular expression typos MIME-Version: 1.0 Content-Type: text/plain; charset=3DUTF-8 Content-Transfer-Encoding: 8bit Problem reported by Mattias Engdeg=C3=A5rd in: https://lists.gnu.org/r/emacs-devel/2019-03/msg00548.html except that I didn=E2=80=99t address the issues involving Hebrew, or involving comint-prompt-regexp. * lisp/align.el (align-rules-list, align-exclude-rules-list): * lisp/auth-source-pass.el (auth-source-pass--parse-secret) (auth-source-pass--parse-data): * lisp/cedet/data-debug.el (data-debug-next) (data-debug-prev, data-debug-expand-or-contract): * lisp/comint.el (comint-within-quotes): * lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine): * lisp/emulation/viper-ex.el (ex-cmd-complete): * lisp/gnus/gnus-cite.el (gnus-message-search-citation-line): * lisp/gnus/nnir.el (nnir-imap-end-of-input): * lisp/mail/mail-extr.el (mail-extr-all-letters): * lisp/minibuffer.el (minibuffer-maybe-quote-filename): * lisp/nxml/rng-nxml.el (rng-complete-tag) (rng-complete-end-tag, rng-complete-attribute-name): * lisp/obsolete/vip.el (vip-get-ex-token, vip-get-ex-pat): * lisp/org/org-pcomplete.el (org-thing-at-point): * lisp/org/org.el (org-set-tags) (org-increase-number-at-point) (org-fill-line-break-nobreak-p): * lisp/pcomplete.el (pcomplete-parse-comint-arguments): * lisp/progmodes/ada-mode.el (ada-compile-goto-error): * lisp/progmodes/cperl-mode.el (cperl-highlight-charclass) (cperl-find-pods-heres, cperl-not-bad-style-regexp) (cperl-regext-to-level-start): * lisp/progmodes/ebnf-yac.el (ebnf-yac-skip-spaces): * lisp/progmodes/flymake-proc.el (flymake-proc-master-tex-init): * lisp/progmodes/flymake.el (flymake-diag-region): * lisp/progmodes/fortran.el (fortran-current-line-indentation): * lisp/progmodes/idlw-complete-structtag.el: (idlwave-complete-structure-tag): * lisp/progmodes/idlwave.el (idlwave-complete-sysvar-or-tag): * lisp/progmodes/prolog.el (prolog-pred-end) (prolog-clause-info): * lisp/progmodes/ruby-mode.el (ruby-forward-sexp) (ruby-backward-sexp): * lisp/progmodes/verilog-mode.el (verilog-repair-open-comma): * lisp/term.el (term-within-quotes): * lisp/textmodes/bib-mode.el (bib-capitalize-title-stop-words): * lisp/textmodes/refbib.el (r2b-capitalize-title-stop-words): * lisp/textmodes/reftex-parse.el (reftex-nth-arg): * lisp/textmodes/rst.el (rst-svn-rev): * lisp/url/url-http.el (url-http-parse-response): * test/lisp/progmodes/f90-tests.el (f90-test-bug3730): Fix regular expression typos. --- lisp/align.el | 4 ++-- lisp/auth-source-pass.el | 4 ++-- lisp/cedet/data-debug.el | 6 +++--- lisp/comint.el | 4 ++-- lisp/emacs-lisp/checkdoc.el | 2 +- lisp/emulation/viper-ex.el | 2 +- lisp/gnus/gnus-cite.el | 2 +- lisp/gnus/nnir.el | 2 +- lisp/mail/mail-extr.el | 10 +--------- lisp/minibuffer.el | 2 +- lisp/nxml/rng-nxml.el | 6 +++--- lisp/obsolete/vip.el | 6 +++--- lisp/org/org-pcomplete.el | 2 +- lisp/org/org.el | 6 +++--- lisp/pcomplete.el | 2 +- lisp/progmodes/ada-mode.el | 2 +- lisp/progmodes/cperl-mode.el | 18 +++++++++--------- lisp/progmodes/ebnf-yac.el | 2 +- lisp/progmodes/flymake-proc.el | 2 +- lisp/progmodes/flymake.el | 2 +- lisp/progmodes/fortran.el | 2 +- lisp/progmodes/idlw-complete-structtag.el | 2 +- lisp/progmodes/idlwave.el | 2 +- lisp/progmodes/prolog.el | 4 ++-- lisp/progmodes/ruby-mode.el | 6 +++--- lisp/progmodes/verilog-mode.el | 2 +- lisp/term.el | 4 ++-- lisp/textmodes/bib-mode.el | 2 +- lisp/textmodes/refbib.el | 2 +- lisp/textmodes/reftex-parse.el | 2 +- lisp/textmodes/rst.el | 2 +- lisp/url/url-http.el | 2 +- test/lisp/progmodes/f90-tests.el | 2 +- 33 files changed, 56 insertions(+), 64 deletions(-) diff --git a/lisp/align.el b/lisp/align.el index 594d15eee1..a81498be5d 100644 --- a/lisp/align.el +++ b/lisp/align.el @@ -452,7 +452,7 @@ align-rules-list (tab-stop . nil)) =20 (make-assignment - (regexp . "^\\s-*\\w+\\(\\s-*\\):?=3D\\(\\s-*\\)\\([^\t\n \\\\]\\= |$\\)") + (regexp . "^\\s-*\\w+\\(\\s-*\\):?=3D\\(\\s-*\\)\\([^\t\n \\]\\|$= \\)") (group . (1 2)) (modes . '(makefile-mode)) (tab-stop . nil)) @@ -759,7 +759,7 @@ align-exclude-rules-list (lambda (end reverse) (funcall (if reverse 're-search-backward 're-search-forward) - (concat "[^ \t\n\\\\]" + (concat "[^ \t\n\\]" (regexp-quote comment-start) "\\(.+\\)$") end t)))) (modes . align-open-comment-modes)) diff --git a/lisp/auth-source-pass.el b/lisp/auth-source-pass.el index deb805a6e1..29ff9c6685 100644 --- a/lisp/auth-source-pass.el +++ b/lisp/auth-source-pass.el @@ -134,12 +134,12 @@ auth-source-pass-parse-entry (defun auth-source-pass--parse-secret (contents) "Parse the password-store data in the string CONTENTS and return its s= ecret. The secret is the first line of CONTENTS." - (car (split-string contents "\\\n" t))) + (car (split-string contents "\n" t))) =20 (defun auth-source-pass--parse-data (contents) "Parse the password-store data in the string CONTENTS and return an al= ist. CONTENTS is the contents of a password-store formatted file." - (let ((lines (split-string contents "\\\n" t "\\\s"))) + (let ((lines (split-string contents "\n" t "\\\s"))) (seq-remove #'null (mapcar (lambda (line) (let ((pair (mapcar (lambda (s) (string-trim s= )) diff --git a/lisp/cedet/data-debug.el b/lisp/cedet/data-debug.el index ba312433d3..eeec6b5834 100644 --- a/lisp/cedet/data-debug.el +++ b/lisp/cedet/data-debug.el @@ -920,14 +920,14 @@ data-debug-next (interactive) (forward-line 1) (beginning-of-line) - (skip-chars-forward " *-><[]" (point-at-eol))) + (skip-chars-forward "- *><[]" (point-at-eol))) =20 (defun data-debug-prev () "Go to the previous line in the Ddebug buffer." (interactive) (forward-line -1) (beginning-of-line) - (skip-chars-forward " *-><[]" (point-at-eol))) + (skip-chars-forward "- *><[]" (point-at-eol))) =20 (defun data-debug-next-expando () "Go to the next line in the Ddebug buffer. @@ -1014,7 +1014,7 @@ data-debug-expand-or-contract (data-debug-current-line-expanded-p)) (data-debug-contract-current-line) (data-debug-expand-current-line)) - (skip-chars-forward " *-><[]" (point-at-eol))) + (skip-chars-forward "- *><[]" (point-at-eol))) =20 (defun data-debug-expand-or-contract-mouse (event) "Expand or contract anything at event EVENT." diff --git a/lisp/comint.el b/lisp/comint.el index a5fca7ea2a..a71821baa5 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -1618,8 +1618,8 @@ comint-history-isearch-pop-state (defun comint-within-quotes (beg end) "Return t if the number of quotes between BEG and END is odd. Quotes are single and double." - (let ((countsq (comint-how-many-region "\\(^\\|[^\\\\]\\)'" beg end)) - (countdq (comint-how-many-region "\\(^\\|[^\\\\]\\)\"" beg end))) + (let ((countsq (comint-how-many-region "\\(^\\|[^\\]\\)'" beg end)) + (countdq (comint-how-many-region "\\(^\\|[^\\]\\)\"" beg end))) (or (=3D (mod countsq 2) 1) (=3D (mod countdq 2) 1)))) =20 (defun comint-how-many-region (regexp beg end) diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el index dca2f16956..fa6f85c588 100644 --- a/lisp/emacs-lisp/checkdoc.el +++ b/lisp/emacs-lisp/checkdoc.el @@ -1511,7 +1511,7 @@ checkdoc-this-string-valid-engine (line-end-position)))))))) ;; Continuation of above. Make sure our sentence is capitalized. (save-excursion - (skip-chars-forward "\"\\*") + (skip-chars-forward "\"*") (if (looking-at "[a-z]") (if (checkdoc-autofix-ask-replace (match-beginning 0) (match-end 0) diff --git a/lisp/emulation/viper-ex.el b/lisp/emulation/viper-ex.el index f5090573c8..45b91cd9c0 100644 --- a/lisp/emulation/viper-ex.el +++ b/lisp/emulation/viper-ex.el @@ -565,7 +565,7 @@ ex-cmd-complete (let (save-pos dist compl-list string-to-complete completion-result) =20 (save-excursion - (setq dist (skip-chars-backward "[a-zA-Z!=3D>&~]") + (setq dist (skip-chars-backward "a-zA-Z!=3D>&~") save-pos (point))) =20 (if (or (=3D dist 0) diff --git a/lisp/gnus/gnus-cite.el b/lisp/gnus/gnus-cite.el index 2216d4a042..7e431e79fc 100644 --- a/lisp/gnus/gnus-cite.el +++ b/lisp/gnus/gnus-cite.el @@ -1128,7 +1128,7 @@ gnus-message-search-citation-line (let ((cdepth (min (length (apply 'concat (split-string (match-string-no-properties 0) - "[ \t [:alnum:]]+"))) + "[\t [:alnum:]]+"))) gnus-message-max-citation-depth)) (mlist (make-list (* (1+ gnus-message-max-citation-depth) 2) nil)) (start (point-at-bol)) diff --git a/lisp/gnus/nnir.el b/lisp/gnus/nnir.el index 7c94abde0d..37a38a58d4 100644 --- a/lisp/gnus/nnir.el +++ b/lisp/gnus/nnir.el @@ -1185,7 +1185,7 @@ nnir-imap-delimited-string =20 (defun nnir-imap-end-of-input () "Are we at the end of input?" - (skip-chars-forward "[[:blank:]]") + (skip-chars-forward "[:blank:]") (looking-at "$")) =20 =20 diff --git a/lisp/mail/mail-extr.el b/lisp/mail/mail-extr.el index ae849d7b62..cb57d8ea01 100644 --- a/lisp/mail/mail-extr.el +++ b/lisp/mail/mail-extr.el @@ -293,7 +293,7 @@ mail-extr-all-letters-but-separators ;; multipart names. ;; #### should . be in here? (defconst mail-extr-all-letters - (purecopy (concat mail-extr-all-letters-but-separators "---"))) + (purecopy (concat mail-extr-all-letters-but-separators "-"))) =20 ;; Any character that can start a name. ;; Keep this set as minimal as possible. @@ -305,19 +305,11 @@ mail-extr-last-letters =20 (defconst mail-extr-leading-garbage "\\W+") =20 -;; (defconst mail-extr-non-name-chars -;; (purecopy (concat "^" mail-extr-all-letters "."))) ;; (defconst mail-extr-non-begin-name-chars ;; (purecopy (concat "^" mail-extr-first-letters))) ;; (defconst mail-extr-non-end-name-chars ;; (purecopy (concat "^" mail-extr-last-letters))) =20 -;; Matches an initial not followed by both a period and a space. -;; (defconst mail-extr-bad-initials-pattern -;; (purecopy -;; (format "\\(\\([^%s]\\|\\`\\)[%s]\\)\\(\\.\\([^ ]\\)\\| \\|\\([^%s= .]\\)\\|\\'\\)" -;; mail-extr-all-letters mail-extr-first-letters mail-extr-al= l-letters))) - ;; Matches periods used instead of spaces. Must not match the period ;; following an initial. (defconst mail-extr-bad-dot-pattern diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index c5d714846d..df0acbb343 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -2297,7 +2297,7 @@ minibuffer-maybe-quote-filename (if (and (not (file-name-quoted-p filename)) (file-name-absolute-p filename) (string-match-p (if (memq system-type '(windows-nt ms-dos)) - "[/\\\\]~" "/~") + "[/\\]~" "/~") (file-local-name filename))) (file-name-quote filename) (minibuffer--double-dollars filename))) diff --git a/lisp/nxml/rng-nxml.el b/lisp/nxml/rng-nxml.el index c110937b34..05b59316d1 100644 --- a/lisp/nxml/rng-nxml.el +++ b/lisp/nxml/rng-nxml.el @@ -160,7 +160,7 @@ rng-complete-tag (and rng-collecting-text (rng-flush-text)) (let ((target-names (rng-match-possible-start-tag-names))) `(,(1+ lt-pos) - ,(save-excursion (skip-chars-forward "[[:alnum:]_.-:]") (point= )) + ,(save-excursion (skip-chars-forward "-[:alnum:]_.:") (point)) ,(apply-partially #'rng-complete-qname-function target-names nil extra-strings) :exit-function @@ -207,7 +207,7 @@ rng-complete-end-tag (cdar rng-open-elements)) (cdar rng-open-elements)))) `(,(+ (match-beginning 0) 2) - ,(save-excursion (skip-chars-forward "[[:alnum:]_.-:]") (= point)) + ,(save-excursion (skip-chars-forward "-[:alnum:]_.:") (po= int)) ,(list start-tag-name) ;Sole completion candidate. :exit-function ,(lambda (_completion status) @@ -247,7 +247,7 @@ rng-complete-attribute-name "xmlns")) rng-undeclared-prefixes))) `(,attribute-start - ,(save-excursion (skip-chars-forward "[[:alnum:]_.-:]") (= point)) + ,(save-excursion (skip-chars-forward "-[:alnum:]_.:") (po= int)) ,(apply-partially #'rng-complete-qname-function target-names t extra-strings) :exit-function diff --git a/lisp/obsolete/vip.el b/lisp/obsolete/vip.el index 0360db9bca..bc4b90031e 100644 --- a/lisp/obsolete/vip.el +++ b/lisp/obsolete/vip.el @@ -2216,7 +2216,7 @@ vip-get-ex-token (while (and (not (eolp)) cont) ;;(re-search-forward "[^/]*/") (re-search-forward "[^/]*\\(/\\|\n\\)") - (if (not (vip-looking-back "[^\\\\]\\(\\\\\\\\\\)*\\\\/")) + (if (not (vip-looking-back "[^\\]\\(\\\\\\\\\\)*\\\\/")) (setq cont nil)))) (backward-char 1) (setq ex-token (buffer-substring (point) (mark))) @@ -2229,7 +2229,7 @@ vip-get-ex-token (while (and (not (eolp)) cont) ;;(re-search-forward "[^\\?]*\\?") (re-search-forward "[^\\?]*\\(\\?\\|\n\\)") - (if (not (vip-looking-back "[^\\\\]\\(\\\\\\\\\\)*\\\\\\?")) + (if (not (vip-looking-back "[^\\]\\(\\\\\\\\\\)*\\\\\\?")) (setq cont nil)) (backward-char 1) (if (not (looking-at "\n")) (forward-char 1)))) @@ -2325,7 +2325,7 @@ vip-get-ex-pat (while (and (not (eolp)) cont) (re-search-forward "[^/]*\\(/\\|\n\\)") ;;(re-search-forward "[^/]*/") - (if (not (vip-looking-back "[^\\\\]\\(\\\\\\\\\\)*\\\\/")) + (if (not (vip-looking-back "[^\\]\\(\\\\\\\\\\)*\\\\/")) (setq cont nil)))) (setq ex-token (if (=3D (mark) (point)) "" diff --git a/lisp/org/org-pcomplete.el b/lisp/org/org-pcomplete.el index b8a2f68759..49983c40a5 100644 --- a/lisp/org/org-pcomplete.el +++ b/lisp/org/org-pcomplete.el @@ -82,7 +82,7 @@ org-thing-at-point (not (equal (char-after (point-at-bol)) ?*)) (save-excursion (move-beginning-of-line 1) - (skip-chars-backward "[ \t\n]") + (skip-chars-backward " \t\n") ;; org-drawer-regexp matches a whole line but while ;; looking-back, we just ignore trailing whitespaces (or (looking-back (substring org-drawer-regexp 0 -1) diff --git a/lisp/org/org.el b/lisp/org/org.el index e3c78ae90d..bf7e305b7a 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el @@ -14953,7 +14953,7 @@ org-set-tags (unless (equal tags "") (let* ((level (save-excursion (beginning-of-line) - (skip-chars-forward "\\*"))) + (skip-chars-forward "*"))) (offset (if (bound-and-true-p org-indent-mode) (* (1- org-indent-indentation-per-level) (1- level)) @@ -20615,7 +20615,7 @@ org-increase-number-at-point (unless inc (setq inc 1)) (let ((pos (point)) (beg (skip-chars-backward "-+^/*0-9eE.")) - (end (skip-chars-forward "-+^/*0-9eE^.")) nap) + (end (skip-chars-forward "-+^/*0-9eE.")) nap) (setq nap (buffer-substring-no-properties (+ pos beg) (+ pos beg end))) (delete-region (+ pos beg) (+ pos beg end)) @@ -22837,7 +22837,7 @@ org-setup-filling (defun org-fill-line-break-nobreak-p () "Non-nil when a new line at point would create an Org line break." (save-excursion - (skip-chars-backward "[ \t]") + (skip-chars-backward " \t") (skip-chars-backward "\\\\") (looking-at "\\\\\\\\\\($\\|[^\\]\\)"))) =20 diff --git a/lisp/pcomplete.el b/lisp/pcomplete.el index d4ee2c38fa..ef285db57e 100644 --- a/lisp/pcomplete.el +++ b/lisp/pcomplete.el @@ -768,7 +768,7 @@ pcomplete-parse-comint-arguments (push (point) begins) (while (progn - (skip-chars-forward "^ \t\n\\") + (skip-chars-forward "^ \t\n") (when (eq (char-after) ?\\) (forward-char 1) (unless (eolp) diff --git a/lisp/progmodes/ada-mode.el b/lisp/progmodes/ada-mode.el index 59dc1d0fda..e01f1e8ecb 100644 --- a/lisp/progmodes/ada-mode.el +++ b/lisp/progmodes/ada-mode.el @@ -767,7 +767,7 @@ ada-compile-goto-error (interactive "d") (goto-char pos) =20 - (skip-chars-backward "-a-zA-Z0-9_:./\\") + (skip-chars-backward "-a-zA-Z0-9_:./\\\\") (cond ;; special case: looking at a filename:line not at the beginning of = a line ;; or a simple line reference "at line ..." diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index 970c5669c6..0b6008a511 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el @@ -3507,18 +3507,18 @@ cperl-look-at-leading-count (defsubst cperl-highlight-charclass (endbracket dashface bsface onec-spa= ce) (let ((l '(1 5 7)) ll lle lll ;; 2 groups, the first takes the whole match (include \[trnfabe]) - (singleChar (concat "\\(" "[^\\\\]" "\\|" "\\\\[^cdg-mo-qsu-zA-Z0-9_]" = "\\|" "\\\\c." "\\|" "\\\\x" "\\([0-9a-fA-F][0-9a-fA-F]?\\|\\=3D{[0-9a-fA= -F]+}\\)" "\\|" "\\\\0?[0-7][0-7]?[0-7]?" "\\|" "\\\\N{[^{}]*}" "\\)"))) + (singleChar (concat "\\(" "[^\\]" "\\|" "\\\\[^cdg-mo-qsu-zA-Z0-9_]" "\= \|" "\\\\c." "\\|" "\\\\x" "\\([0-9a-fA-F][0-9a-fA-F]?\\|\\=3D{[0-9a-fA-F= ]+}\\)" "\\|" "\\\\0?[0-7][0-7]?[0-7]?" "\\|" "\\\\N{[^{}]*}" "\\)"))) (while ; look for unescaped - between non-classes (re-search-forward ;; On 19.33, certain simplifications lead ;; to bugs (as in [^a-z] \\| [trnfabe] ) (concat ; 1: SingleChar (include \[trnfabe]) singleChar - ;;"\\(" "[^\\\\]" "\\|" "\\\\[^cdg-mo-qsu-zA-Z0-9_]" "\\|" "\\\\c." "= \\|" "\\\\x" "\\([0-9a-fA-F][0-9a-fA-F]?\\|\\=3D{[0-9a-fA-F]+}\\)" "\\|" = "\\\\0?[0-7][0-7]?[0-7]?" "\\|" "\\\\N{[^{}]*}" "\\)" + ;;"\\(" "[^\\]" "\\|" "\\\\[^cdg-mo-qsu-zA-Z0-9_]" "\\|" "\\\\c." "\\= |" "\\\\x" "\\([0-9a-fA-F][0-9a-fA-F]?\\|\\=3D{[0-9a-fA-F]+}\\)" "\\|" "\= \\\0?[0-7][0-7]?[0-7]?" "\\|" "\\\\N{[^{}]*}" "\\)" "\\(" ; 3: DASH SingleChar (match optionally) "\\(-\\)" ; 4: DASH singleChar ; 5: SingleChar - ;;"\\(" "[^\\\\]" "\\|" "\\\\[^cdg-mo-qsu-zA-Z0-9_]" "\\|" "\\\\c."= "\\|" "\\\\x" "\\([0-9a-fA-F][0-9a-fA-F]?\\|\\=3D{[0-9a-fA-F]+}\\)" "\\|= " "\\\\0?[0-7][0-7]?[0-7]?" "\\|" "\\\\N{[^{}]*}" "\\)" + ;;"\\(" "[^\\]" "\\|" "\\\\[^cdg-mo-qsu-zA-Z0-9_]" "\\|" "\\\\c." "= \\|" "\\\\x" "\\([0-9a-fA-F][0-9a-fA-F]?\\|\\=3D{[0-9a-fA-F]+}\\)" "\\|" = "\\\\0?[0-7][0-7]?[0-7]?" "\\|" "\\\\N{[^{}]*}" "\\)" "\\)?" "\\|" "\\(" ; 7: other escapes @@ -4455,13 +4455,13 @@ cperl-find-pods-heres ;; Apparently, I can't put \] into a charclass ;; in m]]: m][\\\]\]] produces [\\]] ;;; POSIX? [:word:] [:^word:] only inside [] -;;; "\\=3D\\(\\\\.\\|[^][\\\\]\\|\\[:\\^?\sw+:]\\|\\[[^:]\\)*]") +;;; "\\=3D\\(\\\\.\\|[^][\\]\\|\\[:\\^?\sw+:]\\|\\[[^:]\\)*]") (while ; look for unescaped ] (and argument (re-search-forward (if (eq (char-after b) ?\] ) - "\\=3D\\(\\\\[^]]\\|[^]\\\\]\\)*\\\\]" - "\\=3D\\(\\\\.\\|[^]\\\\]\\)*]") + "\\=3D\\(\\\\[^]]\\|[^]\\]\\)*\\\\]" + "\\=3D\\(\\\\.\\|[^]\\]\\)*]") (1- e) 'toend)) ;; Is this ] an end of POSIX class? (if (save-excursion @@ -4580,7 +4580,7 @@ cperl-find-pods-heres ;; Works also if the outside delimiters are (). (or;;(if (eq (char-after b) ?\) ) ;;(re-search-forward - ;; "[^\\\\]\\(\\\\\\\\\\)*\\\\)" + ;; "[^\\]\\(\\\\\\\\\\)*\\\\)" ;; (1- e) 'toend) (search-forward ")" (1- e) 'toend) ;;) @@ -7261,7 +7261,7 @@ cperl-not-bad-style-regexp ".->" ; a->b "->" ; a SPACE ->b "\\[-" ; a[-1] - "\\\\[&$@*\\\\]" ; \&func + "\\\\[&$@*\\]" ; \&func "^=3D" ; =3Dhead "\\$." ; $| "<<[a-zA-Z_'\"`]" ; < i 0) - (skip-chars-backward " \t\n,.:;|&^~=3D!?\\+\\-\\*") + (skip-chars-backward "- \t\n,.:;|&^~=3D!?+*") (forward-char -1) (cond ((looking-at "\\s)") (goto-char (scan-sexps (1+ (point)) -1)) @@ -1546,7 +1546,7 @@ ruby-backward-sexp ((looking-at "\\s\"\\|\\\\\\S_") (let ((c (char-to-string (char-before (match-end 0)))= )) (while (and (search-backward c) - (eq (logand (skip-chars-backward "\\") 1) + (eq (logand (skip-chars-backward "\\\\") 1) 1)))) nil) ((looking-at "\\s.\\|\\s\\") diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode= .el index f9c3177be4..9e241c70e7 100644 --- a/lisp/progmodes/verilog-mode.el +++ b/lisp/progmodes/verilog-mode.el @@ -10494,7 +10494,7 @@ verilog-repair-open-comma (looking-at "[(,]"))) (not (save-excursion ; Not `endif, or user define (backward-char 1) - (skip-chars-backward "[a-zA-Z0-9_`]") + (skip-chars-backward "a-zA-Z0-9_`") (looking-at "`")))) (insert ",")))) =20 diff --git a/lisp/term.el b/lisp/term.el index 693362cc73..586a887a29 100644 --- a/lisp/term.el +++ b/lisp/term.el @@ -1984,8 +1984,8 @@ term-magic-space (defun term-within-quotes (beg end) "Return t if the number of quotes between BEG and END is odd. Quotes are single and double." - (let ((countsq (term-how-many-region "\\(^\\|[^\\\\]\\)'" beg end)) - (countdq (term-how-many-region "\\(^\\|[^\\\\]\\)\"" beg end))) + (let ((countsq (term-how-many-region "\\(^\\|[^\\]\\)'" beg end)) + (countdq (term-how-many-region "\\(^\\|[^\\]\\)\"" beg end))) (or (=3D (mod countsq 2) 1) (=3D (mod countdq 2) 1)))) =20 (defun term-how-many-region (regexp beg end) diff --git a/lisp/textmodes/bib-mode.el b/lisp/textmodes/bib-mode.el index 81dfb6c99c..7a5d3ef775 100644 --- a/lisp/textmodes/bib-mode.el +++ b/lisp/textmodes/bib-mode.el @@ -198,7 +198,7 @@ unread-bib =20 (defvar bib-capitalize-title-stop-words (concat - "the\\|and\\|of\\|is\\|a\\|an\\|of\\|for\\|in\\|to\\|in\\|on\\|at\= \|" + "the\\|and\\|of\\|is\\|a\\|an\\|for\\|in\\|to\\|on\\|at\\|" "by\\|with\\|that\\|its") "Words not to be capitalized in a title (unless the first word).") =20 diff --git a/lisp/textmodes/refbib.el b/lisp/textmodes/refbib.el index f8013c73bb..3ba52e61ea 100644 --- a/lisp/textmodes/refbib.el +++ b/lisp/textmodes/refbib.el @@ -137,7 +137,7 @@ r2b-delimit-with-quote =20 (defvar r2b-capitalize-title-stop-words (concat - "the\\|and\\|of\\|is\\|a\\|an\\|of\\|for\\|in\\|to\\|in\\|on\\|at\= \|" + "the\\|and\\|of\\|is\\|a\\|an\\|for\\|in\\|to\\|on\\|at\\|" "by\\|with\\|that\\|its") "Words not to be capitalized in a title (unless the first word).") =20 diff --git a/lisp/textmodes/reftex-parse.el b/lisp/textmodes/reftex-parse= .el index 2f9b7268fc..005816e965 100644 --- a/lisp/textmodes/reftex-parse.el +++ b/lisp/textmodes/reftex-parse.el @@ -1000,7 +1000,7 @@ reftex-nth-arg (eq (following-char) ?\{)) (cl-incf cnt))) (if (and (=3D n cnt) - (> (skip-chars-forward "{\\[") 0)) + (> (skip-chars-forward "{[") 0)) (reftex-context-substring) nil)))) =20 diff --git a/lisp/textmodes/rst.el b/lisp/textmodes/rst.el index 0fc2f170a6..ba5d7e4f46 100644 --- a/lisp/textmodes/rst.el +++ b/lisp/textmodes/rst.el @@ -225,7 +225,7 @@ rst-svn-rev "The SVN revision of this file. SVN revision is the upstream (docutils) revision.") (defconst rst-svn-timestamp - (rst-extract-version "\\$" "LastChangedDate: " ".+?+" " " + (rst-extract-version "\\$" "LastChangedDate: " ".+" " " "$LastChangedDate: 2017-01-08 10:54:35 +0100 (Sun, 08 Jan 2017)= $") "The SVN time stamp of this file.") =20 diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el index 651a2cc94c..46baa8a148 100644 --- a/lisp/url/url-http.el +++ b/lisp/url/url-http.el @@ -513,7 +513,7 @@ url-http-parse-response (url-http-debug "url-http-parse-response called in (%s)" (buffer-name)= ) (goto-char (point-min)) (skip-chars-forward " \t\n") ; Skip any blank crap - (skip-chars-forward "HTTP/") ; Skip HTTP Version + (skip-chars-forward "/HPT") ; Skip HTTP Version "HTTP/". (setq url-http-response-version (buffer-substring (point) (progn diff --git a/test/lisp/progmodes/f90-tests.el b/test/lisp/progmodes/f90-t= ests.el index 3cd7392bbc..b164238841 100644 --- a/test/lisp/progmodes/f90-tests.el +++ b/test/lisp/progmodes/f90-tests.el @@ -98,7 +98,7 @@ f90-test-indent (insert "(/ x /)") (f90-do-auto-fill) (beginning-of-line) - (skip-chars-forward "[ \t]") + (skip-chars-forward " \t") (should (equal "&(/" (buffer-substring (point) (+ 3 (point))))))) =20 ;; TODO bug#5593 --=20 2.20.1 --------------9EB61C9AA2BCB9DC2D39B4EA Content-Type: text/plain; charset=UTF-8; name="mail-extr.txt" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="mail-extr.txt" bGlzcC9tYWlsL2Zvb3Rub3RlLmVsOjM2NjozOiBJbiBmb290bm90ZS1oZWJyZXctbnVtZXJp Yy1yZWdleDogRHVwbGljYXRlZCBg16onIGluc2lkZSBjaGFyYWN0ZXIgYWx0ZXJuYXRpdmUg KHBvcyAyMykKICAiW9eQ15HXkteT15TXldeW15fXmNeZ15vXnNee16DXodei16TXpten16jX qdeq16rXp9eq16jXqtep16rXqteq16rXpyddKyIKICAgLi4uLi4uLi4uLi4uLi4uLi4uLi4u Li5eCmxpc3AvbWFpbC9mb290bm90ZS5lbDozNjY6MzogSW4gZm9vdG5vdGUtaGVicmV3LW51 bWVyaWMtcmVnZXg6IER1cGxpY2F0ZWQgYNenJyBpbnNpZGUgY2hhcmFjdGVyIGFsdGVybmF0 aXZlIChwb3MgMjQpCiAgIlvXkNeR15LXk9eU15XXlteX15jXmdeb15zXnteg16HXotek16bX p9eo16nXqteq16fXqteo16rXqdeq16rXqteq16cnXSsiCiAgIC4uLi4uLi4uLi4uLi4uLi4u Li4uLi4uLl4KbGlzcC9tYWlsL2Zvb3Rub3RlLmVsOjM2NjozOiBJbiBmb290bm90ZS1oZWJy ZXctbnVtZXJpYy1yZWdleDogRHVwbGljYXRlZCBg16gnIGluc2lkZSBjaGFyYWN0ZXIgYWx0 ZXJuYXRpdmUgKHBvcyAyNikKICAiW9eQ15HXkteT15TXldeW15fXmNeZ15vXnNee16DXodei 16TXpten16jXqdeq16rXp9eq16jXqtep16rXqteq16rXpyddKyIKICAgLi4uLi4uLi4uLi4u Li4uLi4uLi4uLi4uLi5eCmxpc3AvbWFpbC9mb290bm90ZS5lbDozNjY6MzogSW4gZm9vdG5v dGUtaGVicmV3LW51bWVyaWMtcmVnZXg6IER1cGxpY2F0ZWQgYNeqJyBpbnNpZGUgY2hhcmFj dGVyIGFsdGVybmF0aXZlIChwb3MgMjcpCiAgIlvXkNeR15LXk9eU15XXlteX15jXmdeb15zX nteg16HXotek16bXp9eo16nXqteq16fXqteo16rXqdeq16rXqteq16cnXSsiCiAgIC4uLi4u Li4uLi4uLi4uLi4uLi4uLi4uLi4uLl4KbGlzcC9tYWlsL2Zvb3Rub3RlLmVsOjM2NjozOiBJ biBmb290bm90ZS1oZWJyZXctbnVtZXJpYy1yZWdleDogRHVwbGljYXRlZCBg16knIGluc2lk ZSBjaGFyYWN0ZXIgYWx0ZXJuYXRpdmUgKHBvcyAyOCkKICAiW9eQ15HXkteT15TXldeW15fX mNeZ15vXnNee16DXodei16TXpten16jXqdeq16rXp9eq16jXqtep16rXqteq16rXpyddKyIK ICAgLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLl4KbGlzcC9tYWlsL2Zvb3Rub3RlLmVs OjM2NjozOiBJbiBmb290bm90ZS1oZWJyZXctbnVtZXJpYy1yZWdleDogRHVwbGljYXRlZCBg 16onIGluc2lkZSBjaGFyYWN0ZXIgYWx0ZXJuYXRpdmUgKHBvcyAzMCkKICAiW9eQ15HXkteT 15TXldeW15fXmNeZ15vXnNee16DXodei16TXpten16jXqdeq16rXp9eq16jXqtep16rXqteq 16rXpyddKyIKICAgLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uXgpsaXNwL21haWwv Zm9vdG5vdGUuZWw6MzY2OjM6IEluIGZvb3Rub3RlLWhlYnJldy1udW1lcmljLXJlZ2V4OiBE dXBsaWNhdGVkIGDXqicgaW5zaWRlIGNoYXJhY3RlciBhbHRlcm5hdGl2ZSAocG9zIDMyKQog ICJb15DXkdeS15PXlNeV15bXl9eY15nXm9ec157XoNeh16LXpNem16fXqNep16rXqten16rX qNeq16nXqteq16rXqtenJ10rIgogICAuLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4u Ll4K --------------9EB61C9AA2BCB9DC2D39B4EA--