From 862d3660b6867c2a6d165b5bd09c360113912365 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 17 Sep 2015 23:03:27 +0000 Subject: [PATCH] Fix several backslash typos in Elisp strings MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * gnus-art.el (gnus-button-handle-library): * gnus-group.el (gnus-read-ephemeral-gmane-group-url): * nntp.el (nntp-via-shell-prompt, nntp-telnet-shell-prompt): * spam-report.el (spam-report-gmane-regex): Fix typo by replacing ‘\’ with ‘\\’ in a string literal. For example, to get the regular expression ‘\.’ use the string literal "\\.", not "\." (which is equivalent to "."). Doc fixes * auth-source.el (auth-source-read-char-choice): * nnmaildir.el (NOV example): * registry.el (registry-search): --- lisp/ChangeLog | 14 ++++++++++++++ lisp/auth-source.el | 2 +- lisp/gnus-art.el | 2 +- lisp/gnus-group.el | 8 ++++---- lisp/nnmaildir.el | 2 +- lisp/nntp.el | 4 ++-- lisp/registry.el | 6 +++--- lisp/spam-report.el | 2 +- 8 files changed, 27 insertions(+), 13 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 409b964d4..0ae5a54b3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,17 @@ +2015-09-17 Paul Eggert + + * gnus-art.el (gnus-button-handle-library): + * gnus-group.el (gnus-read-ephemeral-gmane-group-url): + * nntp.el (nntp-via-shell-prompt, nntp-telnet-shell-prompt): + * spam-report.el (spam-report-gmane-regex): + Fix typo by replacing ‘\’ with ‘\\’ in a string literal. + For example, to get the regular expression ‘\.’ use the string + literal "\\.", not "\." (which is equivalent to "."). + + * auth-source.el (auth-source-read-char-choice): + * nnmaildir.el (NOV example): + * registry.el (registry-search): Doc fix. + 2015-09-14 Katsumi Yamaoka * gnus-compat.el: Require overlay for XEmacs. diff --git a/lisp/auth-source.el b/lisp/auth-source.el index 31175136c..d1f79a0d7 100644 --- a/lisp/auth-source.el +++ b/lisp/auth-source.el @@ -372,7 +372,7 @@ If the value is not a list, symmetric encryption will be used." "Read one of CHOICES by `read-char-choice', or `read-char'. `dropdown-list' support is disabled because it doesn't work reliably. Only one of CHOICES will be returned. The PROMPT is augmented -with \"[a/b/c] \" if CHOICES is '\(?a ?b ?c\)." +with \"[a/b/c] \" if CHOICES is \(?a ?b ?c)." (when choices (let* ((prompt-choices (apply 'concat (loop for c in choices diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index 2821f5f48..f7bdaa8ab 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -7725,7 +7725,7 @@ Calls `describe-variable' or `describe-function'." "Call `locate-library' when pushing the corresponding URL button." (gnus-message 9 "url=`%s'" url) (let* ((lib (locate-library url)) - (file (gnus-replace-in-string (or lib "") "\.elc" ".el"))) + (file (gnus-replace-in-string (or lib "") "\\.elc" ".el"))) (if (not lib) (gnus-message 1 "Cannot locale library `%s'." url) (find-file-read-only file)))) diff --git a/lisp/gnus-group.el b/lisp/gnus-group.el index ad49824f0..21cb1b8b1 100644 --- a/lisp/gnus-group.el +++ b/lisp/gnus-group.el @@ -2435,7 +2435,7 @@ Valid input formats include: ;; URLs providing `group', `start' and `range': ((string-match ;; http://thread.gmane.org/gmane.emacs.devel/86326/focus=86525 - "^http://thread\.gmane\.org/\\([^/]+\\)/\\([0-9]+\\)/focus=\\([0-9]+\\)$" + "^http://thread\\.gmane\\.org/\\([^/]+\\)/\\([0-9]+\\)/focus=\\([0-9]+\\)$" url) (setq group (match-string 1 url) start (string-to-number (match-string 2 url)) @@ -2446,15 +2446,15 @@ Valid input formats include: ;; URLs providing `group' and `start': ((or (string-match ;; http://article.gmane.org/gmane.comp.gnu.make.bugs/3584 - "^http://\\(?:thread\\|article\\|permalink\\)\.gmane\.org/\\([^/]+\\)/\\([0-9]+\\)" + "^http://\\(?:thread\\|article\\|permalink\\)\\.gmane\\.org/\\([^/]+\\)/\\([0-9]+\\)" url) (string-match ;; Don't advertise these in the doc string yet: - "^\\(?:nntp\\|news\\)://news\.gmane\.org/\\([^/]+\\)/\\([0-9]+\\)" + "^\\(?:nntp\\|news\\)://news\\.gmane\\.org/\\([^/]+\\)/\\([0-9]+\\)" url) (string-match ;; http://news.gmane.org/group/gmane.emacs.gnus.general/thread=65099/force_load=t - "^http://news\.gmane\.org/group/\\([^/]+\\)/thread=\\([0-9]+\\)" + "^http://news\\.gmane\\.org/group/\\([^/]+\\)/thread=\\([0-9]+\\)" url)) (setq group (match-string 1 url) start (string-to-number (match-string 2 url)))) diff --git a/lisp/nnmaildir.el b/lisp/nnmaildir.el index 5b72b5207..3d8926b69 100644 --- a/lisp/nnmaildir.el +++ b/lisp/nnmaildir.el @@ -147,7 +147,7 @@ by nnmaildir-request-article.") ;; A NOV structure looks like this (must be prin1-able, so no defstruct): ["subject\tfrom\tdate" - "references\tchars\lines" + "references\tchars\tlines" "To: you\tIn-Reply-To: " (12345 67890) ;; modtime of the corresponding article file (to in-reply-to)] ;; contemporary value of nnmail-extra-headers diff --git a/lisp/nntp.el b/lisp/nntp.el index 6c97cecdc..ec9a66614 100644 --- a/lisp/nntp.el +++ b/lisp/nntp.el @@ -175,7 +175,7 @@ This variable is used by the various nntp-open-via-* methods.") "*Whether both telnet client and server support the ENVIRON option. If non-nil, there will be no prompt for a login name.") -(defvoo nntp-via-shell-prompt "bash\\|\$ *\r?$\\|> *\r?" +(defvoo nntp-via-shell-prompt "bash\\|[$>] *\r?$" "*Regular expression to match the shell prompt on an intermediate host. This variable is used by the `nntp-open-via-telnet-and-telnet' method.") @@ -1764,7 +1764,7 @@ If SEND-IF-FORCE, only send authinfo to the server if the (defvoo nntp-open-telnet-envuser nil "*If non-nil, telnet session (client and server both) will support the ENVIRON option and not prompt for login name.") -(defvoo nntp-telnet-shell-prompt "bash\\|\$ *\r?$\\|> *\r?" +(defvoo nntp-telnet-shell-prompt "bash\\|[$>] *\r?$" "*Regular expression to match the shell prompt on the remote machine.") (defvoo nntp-rlogin-program "rsh" diff --git a/lisp/registry.el b/lisp/registry.el index 5a35e1f0e..23c9e486b 100644 --- a/lisp/registry.el +++ b/lisp/registry.el @@ -242,9 +242,9 @@ When SET is not nil, set it for VAL (use t for an empty list)." (defmethod registry-search ((db registry-db) &rest spec) "Search for SPEC across the registry-db THIS. -For example calling with :member \\='(a 1 2) will match entry \\='((a 3 1)). -Calling with :all t (any non-nil value) will match all. -Calling with :regex \\='\(a \"h.llo\") will match entry \\='((a \"hullo\" \"bye\"). +For example calling with `:member \\='(a 1 2)' will match entry \((a 3 1)). +Calling with `:all t' (any non-nil value) will match all. +Calling with `:regex \\='(a \"h.llo\")' will match entry \(a \"hullo\" \"bye\"). The test order is to check :all first, then :member, then :regex." (when db (let ((all (plist-get spec :all)) diff --git a/lisp/spam-report.el b/lisp/spam-report.el index de680795a..5871b08b3 100644 --- a/lisp/spam-report.el +++ b/lisp/spam-report.el @@ -43,7 +43,7 @@ If you are using spam.el, consider setting gnus-spam-process-newsgroups or the gnus-group-spam-exit-processor-report-gmane group/topic parameter instead." :type '(radio (const nil) - (regexp :value "^nntp\+.*:gmane\.")) + (regexp :value "^nntp\\+.*:gmane\\.")) :group 'spam-report) (defcustom spam-report-gmane-use-article-number t -- 2.25.1