mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-27 07:37:33 +00:00
Remove (or double) redundant backslashes in string literals
See discussion at https://lists.gnu.org/archive/html/emacs-devel/2020-01/msg00749.html . * lisp/obsolete/iswitchb.el (iswitchb-summaries-to-end): * test/src/regex-emacs-tests.el (regex-tests-BOOST-frob-escapes): * test/lisp/help-fns-tests.el (help-fns-test-lisp-macro) (help-fns-test-lisp-defun, help-fns-test-lisp-defsubst) (help-fns-test-alias-to-defun, help-fns-test-bug23887): Double backslashes for desired effect. * lisp/org/ol.el (org-link-escape): * lisp/net/nsm.el (nsm-protocol-check--rsa-kx) (nsm-protocol-check--anon-kx, nsm-protocol-check--sha1-sig): * lisp/obsolete/old-whitespace.el (whitespace-buffer): * lisp/obsolete/rcompile.el (remote-compile-run-before): * lisp/obsolete/vi.el (vi-end-of-blank-delimited-word): * lisp/obsolete/vip.el (vip-current-major-mode) (vip-paren-match, vip-switch-to-buffer) (vip-switch-to-buffer-other-window, vip-kill-buffer) (vip-get-ex-token, ex-edit): * lisp/org/org-element.el (org-element--cache-sync-requests): * lisp/org/org.el (org-sparse-tree): * lisp/textmodes/reftex.el (reftex-report-bug): * test/lisp/ibuffer-tests.el (ibuffer-save-filters): * test/lisp/international/ucs-normalize-tests.el (ucs-normalize-tests--insert-failing-lines): * test/lisp/simple-tests.el (undo-test-kill-c-a-then-undo): * test/lisp/textmodes/conf-mode-tests.el (conf-test-toml-mode): * test/src/regex-emacs-tests.el (regex-tests-compare): Remove redundant backslashes.
This commit is contained in:
parent
a391ffa2f0
commit
0c6c8aa002
@ -371,7 +371,7 @@ Reference:
|
||||
Sheffer, Holz, Saint-Andre (May 2015). \"Recommendations for Secure
|
||||
Use of Transport Layer Security (TLS) and Datagram Transport Layer
|
||||
Security (DTLS)\", \"(4.1. General Guidelines)\"
|
||||
`https://tools.ietf.org/html/rfc7525\#section-4.1'"
|
||||
`https://tools.ietf.org/html/rfc7525#section-4.1'"
|
||||
(let ((kx (plist-get status :key-exchange)))
|
||||
(and (string-match "^\\bRSA\\b" kx)
|
||||
(format-message
|
||||
@ -468,7 +468,7 @@ Reference:
|
||||
|
||||
GnuTLS authors (2018). \"GnuTLS Manual 4.3.3 Anonymous
|
||||
authentication\",
|
||||
`https://www.gnutls.org/manual/gnutls.html\#Anonymous-authentication'"
|
||||
`https://www.gnutls.org/manual/gnutls.html#Anonymous-authentication'"
|
||||
(let ((kx (plist-get status :key-exchange)))
|
||||
(and (string-match "\\bANON\\b" kx)
|
||||
(format-message
|
||||
@ -603,7 +603,7 @@ References:
|
||||
full SHA-1\", `https://shattered.io/static/shattered.pdf'
|
||||
[2]: Chromium Security Education TLS/SSL. \"Deprecated and Removed
|
||||
Features (SHA-1 Certificate Signatures)\",
|
||||
`https://www.chromium.org/Home/chromium-security/education/tls\#TOC-SHA-1-Certificate-Signatures'
|
||||
`https://www.chromium.org/Home/chromium-security/education/tls#TOC-SHA-1-Certificate-Signatures'
|
||||
[3]: Jones J.C (2017). \"The end of SHA-1 on the Public Web\",
|
||||
`https://blog.mozilla.org/security/2017/02/23/the-end-of-sha-1-on-the-public-web/'
|
||||
[4]: Apple Support (2017). \"Move to SHA-256 signed certificates to
|
||||
|
@ -1393,7 +1393,7 @@ Copied from `icomplete-tidy'."
|
||||
"Move the summaries to the end of the list.
|
||||
This is an example function which can be hooked on to
|
||||
`iswitchb-make-buflist-hook'. Any buffer matching the regexps
|
||||
`Summary' or `output\*$'are put to the end of the list."
|
||||
`Summary' or `output\\*$'are put to the end of the list."
|
||||
(let ((summaries (delq nil
|
||||
(mapcar
|
||||
(lambda (x)
|
||||
|
@ -383,10 +383,10 @@ To disable timer scans, set this to zero."
|
||||
(defun whitespace-buffer (&optional quiet)
|
||||
"Find five different types of white spaces in buffer.
|
||||
These are:
|
||||
1. Leading space \(empty lines at the top of a file\).
|
||||
2. Trailing space \(empty lines at the end of a file\).
|
||||
3. Indentation space \(8 or more spaces, that should be replaced with TABS\).
|
||||
4. Spaces followed by a TAB. \(Almost always, we never want that\).
|
||||
1. Leading space \(empty lines at the top of a file).
|
||||
2. Trailing space \(empty lines at the end of a file).
|
||||
3. Indentation space \(8 or more spaces, that should be replaced with TABS).
|
||||
4. Spaces followed by a TAB. \(Almost always, we never want that).
|
||||
5. Spaces or TABS at the end of a line.
|
||||
|
||||
Check for whitespace only if this buffer really contains a non-empty file
|
||||
|
@ -89,7 +89,7 @@ nil means use the value returned by \\[user-login-name]."
|
||||
"Command to run before compilation.
|
||||
This can be used for setting up environment variables,
|
||||
since rsh does not invoke the shell as a login shell and files like .login
|
||||
\(tcsh\) and .bash_profile \(bash\) are not run.
|
||||
\(tcsh) and .bash_profile \(bash) are not run.
|
||||
nil means run no commands."
|
||||
:type '(choice string (const nil))
|
||||
:group 'remote-compile)
|
||||
|
@ -1225,7 +1225,7 @@ SPECIAL FEATURE: char argument can be used to specify shift amount(1-9)."
|
||||
(defun vi-end-of-blank-delimited-word (count)
|
||||
"Forward to the end of the COUNT'th blank-delimited word."
|
||||
(interactive "p")
|
||||
(if (re-search-forward "[^ \t\n\']+[ \t\n\']" nil t count)
|
||||
(if (re-search-forward "[^ \t\n']+[ \t\n']" nil t count)
|
||||
(if (not (eobp)) (backward-char 2))))
|
||||
|
||||
(defun vi-home-window-line (arg)
|
||||
|
@ -80,7 +80,7 @@
|
||||
|
||||
(defvar vip-current-major-mode nil
|
||||
"vip-current-major-mode is the major-mode vi considers it is now.
|
||||
\(buffer specific\)")
|
||||
\(buffer specific)")
|
||||
|
||||
(make-variable-buffer-local 'vip-current-major-mode)
|
||||
|
||||
@ -1510,7 +1510,7 @@ used. This behavior is controlled by the sign of prefix numeric value."
|
||||
(* (/ (point-max) 100) arg)
|
||||
(/ (* (point-max) arg) 100)))
|
||||
(back-to-indentation))
|
||||
(cond ((looking-at "[\(\[{]")
|
||||
(cond ((looking-at "[([{]")
|
||||
(if com (move-marker vip-com-point (point)))
|
||||
(forward-sexp 1)
|
||||
(if com
|
||||
@ -1719,7 +1719,7 @@ STRING. Search will be forward if FORWARD, otherwise backward."
|
||||
(let (buffer)
|
||||
(setq buffer
|
||||
(read-buffer
|
||||
(format "switch to buffer \(%s\): "
|
||||
(format "switch to buffer (%s): "
|
||||
(buffer-name (other-buffer (current-buffer))))))
|
||||
(switch-to-buffer buffer)
|
||||
(vip-change-mode-to-vi)))
|
||||
@ -1730,7 +1730,7 @@ STRING. Search will be forward if FORWARD, otherwise backward."
|
||||
(let (buffer)
|
||||
(setq buffer
|
||||
(read-buffer
|
||||
(format "Switch to buffer \(%s\): "
|
||||
(format "Switch to buffer (%s): "
|
||||
(buffer-name (other-buffer (current-buffer))))))
|
||||
(switch-to-buffer-other-window buffer)
|
||||
(vip-change-mode-to-vi)))
|
||||
@ -1741,7 +1741,7 @@ STRING. Search will be forward if FORWARD, otherwise backward."
|
||||
(let (buffer buffer-name)
|
||||
(setq buffer-name
|
||||
(read-buffer
|
||||
(format "Kill buffer \(%s\): "
|
||||
(format "Kill buffer (%s): "
|
||||
(buffer-name (current-buffer)))))
|
||||
(setq buffer
|
||||
(if (null buffer-name)
|
||||
@ -2162,7 +2162,7 @@ is a command.")
|
||||
|
||||
(defun vip-get-ex-token ()
|
||||
"get an ex-token which is either an address or a command.
|
||||
a token has type \(command, address, end-mark\) and value."
|
||||
a token has type \(command, address, end-mark) and value."
|
||||
(with-current-buffer " *ex-working-space*"
|
||||
(skip-chars-forward " \t")
|
||||
(cond ((looking-at "[k#]")
|
||||
@ -2668,7 +2668,7 @@ a token has type \(command, address, end-mark\) and value."
|
||||
"ex-edit"
|
||||
(vip-get-ex-file)
|
||||
(if (and (not ex-variant) (buffer-modified-p) buffer-file-name)
|
||||
(error "No write since last change \(:e! overrides\)"))
|
||||
(error "No write since last change (:e! overrides)"))
|
||||
(vip-change-mode-to-emacs)
|
||||
(set-buffer
|
||||
(find-file-noselect (concat default-directory ex-file)))
|
||||
|
@ -845,8 +845,8 @@ E.g. \"%C3%B6\" becomes the german o-Umlaut."
|
||||
(insert link)
|
||||
(insert (make-string (- (skip-chars-backward "\\\\"))
|
||||
?\\))
|
||||
(while (search-backward "\]" nil t)
|
||||
(when (looking-at-p "\\]\\(?:[][]\\|\\'\\)")
|
||||
(while (search-backward "]" nil t)
|
||||
(when (looking-at-p "]\\(?:[][]\\|\\'\\)")
|
||||
(insert (make-string (1+ (- (skip-chars-backward "\\\\")))
|
||||
?\\))))
|
||||
(buffer-string)))
|
||||
|
@ -4892,7 +4892,7 @@ with `org-element--cache-compare'. This cache is used in
|
||||
|
||||
A request is a vector with the following pattern:
|
||||
|
||||
\[NEXT BEG END OFFSET PARENT PHASE]
|
||||
[NEXT BEG END OFFSET PARENT PHASE]
|
||||
|
||||
Processing a synchronization request consists of three phases:
|
||||
|
||||
|
@ -11410,8 +11410,8 @@ D Show deadlines and scheduled items between a date range."
|
||||
(setq type (or type org-sparse-tree-default-date-type))
|
||||
(setq org-ts-type type)
|
||||
(message "Sparse tree: [r]egexp [t]odo [T]odo-kwd [m]atch [p]roperty
|
||||
\[d]eadlines [b]efore-date [a]fter-date [D]ates range
|
||||
\[c]ycle through date types: %s"
|
||||
[d]eadlines [b]efore-date [a]fter-date [D]ates range
|
||||
[c]ycle through date types: %s"
|
||||
(cl-case type
|
||||
(all "all timestamps")
|
||||
(scheduled "only scheduled")
|
||||
|
@ -2371,7 +2371,7 @@ what in fact did happen.
|
||||
Check if the bug is reproducible with an up-to-date version of
|
||||
RefTeX available from https://www.gnu.org/software/auctex/.
|
||||
|
||||
If the bug is triggered by a specific \(La)TeX file, you should try
|
||||
If the bug is triggered by a specific (La)TeX file, you should try
|
||||
to produce a minimal sample file showing the problem and include it
|
||||
in your report.
|
||||
|
||||
|
@ -56,28 +56,28 @@ Return first line of the output of (describe-function-1 FUNC)."
|
||||
(should (string-match regexp result))))
|
||||
|
||||
(ert-deftest help-fns-test-lisp-macro ()
|
||||
(let ((regexp "a Lisp macro in .subr\.el")
|
||||
(let ((regexp "a Lisp macro in .subr\\.el")
|
||||
(result (help-fns-tests--describe-function 'when)))
|
||||
(should (string-match regexp result))))
|
||||
|
||||
(ert-deftest help-fns-test-lisp-defun ()
|
||||
(let ((regexp "a compiled Lisp function in .subr\.el")
|
||||
(let ((regexp "a compiled Lisp function in .subr\\.el")
|
||||
(result (help-fns-tests--describe-function 'last)))
|
||||
(should (string-match regexp result))))
|
||||
|
||||
(ert-deftest help-fns-test-lisp-defsubst ()
|
||||
(let ((regexp "a compiled Lisp function in .subr\.el")
|
||||
(let ((regexp "a compiled Lisp function in .subr\\.el")
|
||||
(result (help-fns-tests--describe-function 'posn-window)))
|
||||
(should (string-match regexp result))))
|
||||
|
||||
(ert-deftest help-fns-test-alias-to-defun ()
|
||||
(let ((regexp "an alias for .set-file-modes. in .subr\.el")
|
||||
(let ((regexp "an alias for .set-file-modes. in .subr\\.el")
|
||||
(result (help-fns-tests--describe-function 'chmod)))
|
||||
(should (string-match regexp result))))
|
||||
|
||||
(ert-deftest help-fns-test-bug23887 ()
|
||||
"Test for https://debbugs.gnu.org/23887 ."
|
||||
(let ((regexp "an alias for .re-search-forward. in .subr\.el")
|
||||
(let ((regexp "an alias for .re-search-forward. in .subr\\.el")
|
||||
(result (help-fns-tests--describe-function 'search-forward-regexp)))
|
||||
(should (string-match regexp result))))
|
||||
|
||||
|
@ -82,7 +82,7 @@
|
||||
(test1 '((mode . org-mode)
|
||||
(or (size-gt . 10000)
|
||||
(and (not (starred-name))
|
||||
(directory . "\<org\>")))))
|
||||
(directory . "<org>")))))
|
||||
(test2 '((or (mode . emacs-lisp-mode) (file-extension . "elc?")
|
||||
(and (starred-name) (name . "elisp"))
|
||||
(mode . lisp-interaction-mode))))
|
||||
|
@ -299,7 +299,7 @@ implementations:
|
||||
(list " var var))
|
||||
(dolist (linos (seq-partition newval 8))
|
||||
(insert (mapconcat #'number-to-string linos " ") "\n"))
|
||||
(insert ")\)"))
|
||||
(insert "))"))
|
||||
|
||||
(defun ucs-normalize-check-failing-lines ()
|
||||
(interactive)
|
||||
|
@ -427,7 +427,7 @@ See bug#35036."
|
||||
(with-temp-buffer
|
||||
(switch-to-buffer (current-buffer))
|
||||
(setq buffer-undo-list nil)
|
||||
(insert "a\nb\n\c\n")
|
||||
(insert "a\nb\nc\n")
|
||||
(goto-char (point-max))
|
||||
;; We use a keyboard macro because it adds undo events in the same
|
||||
;; way as if a user were involved.
|
||||
|
@ -162,7 +162,7 @@ image/tiff tiff tif
|
||||
(ert-deftest conf-test-toml-mode ()
|
||||
;; From `conf-toml-mode' docstring.
|
||||
(with-temp-buffer
|
||||
(insert "\[entry]
|
||||
(insert "[entry]
|
||||
value = \"some string\"")
|
||||
(goto-char (point-min))
|
||||
(conf-toml-mode)
|
||||
|
@ -161,7 +161,7 @@ what failed, if anything; valid values are 'search-failed,
|
||||
'compilation-failed and nil. I compare the beginning/end of each
|
||||
group with their expected values. This is done with either
|
||||
BOUNDS-REF or SUBSTRING-REF; one of those should be non-nil.
|
||||
BOUNDS-REF is a sequence \[start-ref0 end-ref0 start-ref1
|
||||
BOUNDS-REF is a sequence [start-ref0 end-ref0 start-ref1
|
||||
end-ref1 ....] while SUBSTRING-REF is the expected substring
|
||||
obtained by indexing the input string by start/end-ref.
|
||||
|
||||
@ -327,7 +327,7 @@ emacs requires an extra symbol character"
|
||||
(defun regex-tests-BOOST-frob-escapes (s ispattern)
|
||||
"Mangle \\ the way it is done in frob_escapes() in
|
||||
regex-tests-BOOST.c in glibc: \\t, \\n, \\r are interpreted;
|
||||
\\\\, \\^, \{, \\|, \} are unescaped for the string (not
|
||||
\\\\, \\^, \\{, \\|, \\} are unescaped for the string (not
|
||||
pattern)"
|
||||
|
||||
;; this is all similar to (regex-tests-unextend)
|
||||
|
Loading…
Reference in New Issue
Block a user