aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuanma Barranquero2019-10-09 06:15:29 +0200
committerJuanma Barranquero2019-10-09 06:15:46 +0200
commit9db9b0b12d8baebcce053bd4fad9cd91f3b97179 (patch)
tree0bb2dc433e2d3b4b7f231ef28c9afcf12dd904de
parent489a106b1c16f422989e20471c3c2f26b2149309 (diff)
downloademacs-9db9b0b12d8baebcce053bd4fad9cd91f3b97179.tar.gz
emacs-9db9b0b12d8baebcce053bd4fad9cd91f3b97179.zip
Fix typos in lisp/*.el
* lisp/emacs-lisp/generator.el (cps--with-value-wrapper) (cps-inhibit-atomic-optimization, iter-close): * lisp/gnus/nnir.el (nnir-imap-search-arguments) (nnir-imap-search-argument-history, nnir-categorize) (nnir-ignored-newsgroups) (nnir-retrieve-headers-override-function) (nnir-imap-default-search-key, nnir-namazu-additional-switches) (gnus-group-make-nnir-group, nnir-add-result) (nnir-compose-result, nnir-run-imap, nnir-imap-make-query) (nnir-imap-query-to-imap, nnir-imap-expr-to-imap) (nnir-imap-next-term, nnir-run-swish-e, nnir-run-namazu) (nnir-read-parm, nnir-read-server-parm, nnir-search-thread): Trivial doc fixes.
-rw-r--r--lisp/emacs-lisp/generator.el6
-rw-r--r--lisp/gnus/nnir.el100
2 files changed, 54 insertions, 52 deletions
diff --git a/lisp/emacs-lisp/generator.el b/lisp/emacs-lisp/generator.el
index dd709b32b09..9dba87eaeb4 100644
--- a/lisp/emacs-lisp/generator.el
+++ b/lisp/emacs-lisp/generator.el
@@ -123,7 +123,7 @@ to the current stack of such wrappers. WRAPPER is a function that
123takes a form and returns a wrapped form. 123takes a form and returns a wrapped form.
124 124
125Whenever we generate an atomic form (i.e., a form that can't 125Whenever we generate an atomic form (i.e., a form that can't
126iter-yield), we first (before actually inserting that form in our 126`iter-yield'), we first (before actually inserting that form in our
127generated code) pass that form through all the transformer 127generated code) pass that form through all the transformer
128functions. We use this facility to wrap forms that can transfer 128functions. We use this facility to wrap forms that can transfer
129control flow non-locally in goo that diverts this control flow to 129control flow non-locally in goo that diverts this control flow to
@@ -170,7 +170,7 @@ DYNAMIC-VAR bound to STATIC-VAR."
170 (and (fboundp handler) handler))) 170 (and (fboundp handler) handler)))
171 171
172(defvar cps-inhibit-atomic-optimization nil 172(defvar cps-inhibit-atomic-optimization nil
173 "When t, always rewrite forms into cps even when they 173 "When non-nil, always rewrite forms into cps even when they
174don't yield.") 174don't yield.")
175 175
176(defvar cps--yield-seen) 176(defvar cps--yield-seen)
@@ -715,7 +715,7 @@ iterator cannot supply more values."
715 715
716(defun iter-close (iterator) 716(defun iter-close (iterator)
717 "Terminate an iterator early. 717 "Terminate an iterator early.
718Run any unwind-protect handlers in scope at the point ITERATOR 718Run any unwind-protect handlers in scope at the point ITERATOR
719is blocked." 719is blocked."
720 (funcall iterator :close nil)) 720 (funcall iterator :close nil))
721 721
diff --git a/lisp/gnus/nnir.el b/lisp/gnus/nnir.el
index 3625302841a..1041373a05f 100644
--- a/lisp/gnus/nnir.el
+++ b/lisp/gnus/nnir.el
@@ -204,7 +204,7 @@
204 ("from" . "FROM") 204 ("from" . "FROM")
205 ("body" . "BODY") 205 ("body" . "BODY")
206 ("imap" . "")) 206 ("imap" . ""))
207 "Mapping from user readable keys to IMAP search items for use in nnir") 207 "Mapping from user readable keys to IMAP search items for use in nnir.")
208 208
209(defvar nnir-imap-search-other "HEADER %S" 209(defvar nnir-imap-search-other "HEADER %S"
210 "The IMAP search item to use for anything other than 210 "The IMAP search item to use for anything other than
@@ -212,7 +212,7 @@
212email header field.") 212email header field.")
213 213
214(defvar nnir-imap-search-argument-history () 214(defvar nnir-imap-search-argument-history ()
215 "The history for querying search options in nnir") 215 "The history for querying search options in nnir.")
216 216
217;;; Helper macros 217;;; Helper macros
218 218
@@ -256,12 +256,12 @@ email header field.")
256 (cons article (nnir-article-number article))) 256 (cons article (nnir-article-number article)))
257 257
258(defmacro nnir-categorize (sequence keyfunc &optional valuefunc) 258(defmacro nnir-categorize (sequence keyfunc &optional valuefunc)
259 "Sort a sequence into categories and returns a list of the form 259 "Sort a SEQUENCE into categories and returns a list of the form
260`((key1 (element11 element12)) (key2 (element21 element22))'. 260`((key1 (element11 element12)) (key2 (element21 element22))'.
261The category key for a member of the sequence is obtained 261The category key for a member of the sequence is obtained
262as `(keyfunc member)' and the corresponding element is just 262as `(KEYFUNC member)' and the corresponding element is just
263`member'. If `valuefunc' is non-nil, the element of the list 263`member'. If VALUEFUNC is non-nil, the element of the list
264is `(valuefunc member)'." 264is `(VALUEFUNC member)'."
265 `(unless (null ,sequence) 265 `(unless (null ,sequence)
266 (let (value) 266 (let (value)
267 (mapc 267 (mapc
@@ -294,7 +294,7 @@ is `(valuefunc member)'."
294 294
295(defcustom nnir-ignored-newsgroups "" 295(defcustom nnir-ignored-newsgroups ""
296 "A regexp to match newsgroups in the active file that should 296 "A regexp to match newsgroups in the active file that should
297 be skipped when searching." 297be skipped when searching."
298 :version "24.1" 298 :version "24.1"
299 :type '(regexp) 299 :type '(regexp)
300 :group 'nnir) 300 :group 'nnir)
@@ -320,16 +320,16 @@ and populates the `nntp-server-buffer' with the retrieved
320headers. Must return either 'nov or 'headers indicating the 320headers. Must return either 'nov or 'headers indicating the
321retrieved header format. 321retrieved header format.
322 322
323If this variable is nil, or if the provided function returns nil for a search 323If this variable is nil, or if the provided function returns nil for
324result, `gnus-retrieve-headers' will be called instead." 324a search result, `gnus-retrieve-headers' will be called instead."
325 :version "24.1" 325 :version "24.1"
326 :type '(choice (const :tag "gnus-retrieve-headers" nil) function) 326 :type '(choice (const :tag "gnus-retrieve-headers" nil) function)
327 :group 'nnir) 327 :group 'nnir)
328 328
329(defcustom nnir-imap-default-search-key "whole message" 329(defcustom nnir-imap-default-search-key "whole message"
330 "The default IMAP search key for an nnir search. Must be one of 330 "The default IMAP search key for an nnir search. Must be one of
331 the keys in `nnir-imap-search-arguments'. To use raw imap queries 331the keys in `nnir-imap-search-arguments'. To use raw imap queries
332 by default set this to \"imap\"." 332by default set this to \"imap\"."
333 :version "24.1" 333 :version "24.1"
334 :type `(choice ,@(mapcar (lambda (elem) (list 'const (car elem))) 334 :type `(choice ,@(mapcar (lambda (elem) (list 'const (car elem)))
335 nnir-imap-search-arguments)) 335 nnir-imap-search-arguments))
@@ -467,8 +467,8 @@ arrive at the correct group name, \"mail.misc\"."
467 467
468(defcustom nnir-namazu-additional-switches '() 468(defcustom nnir-namazu-additional-switches '()
469 "A list of strings, to be given as additional arguments to namazu. 469 "A list of strings, to be given as additional arguments to namazu.
470The switches `-q', `-a', and `-s' are always used, very few other switches 470The switches `-q', `-a', and `-s' are always used, very few other
471make any sense in this context. 471switches make any sense in this context.
472 472
473Note that this should be a list. I.e., do NOT use the following: 473Note that this should be a list. I.e., do NOT use the following:
474 (setq nnir-namazu-additional-switches \"-i -w\") ; wrong 474 (setq nnir-namazu-additional-switches \"-i -w\") ; wrong
@@ -597,15 +597,15 @@ Add an entry here when adding a new search engine.")
597 (topic &optional level all lowest recursive)) 597 (topic &optional level all lowest recursive))
598 598
599(defun gnus-group-make-nnir-group (nnir-extra-parms &optional specs) 599(defun gnus-group-make-nnir-group (nnir-extra-parms &optional specs)
600 "Create an nnir group. Prompt for a search query and determine 600 "Create an nnir group.
601the groups to search as follows: if called from the *Server* 601Prompt for a search query and determine the groups to search as
602buffer search all groups belonging to the server on the current 602follows: if called from the *Server* buffer search all groups
603line; if called from the *Group* buffer search any marked groups, 603belonging to the server on the current line; if called from the
604or the group on the current line, or all the groups under the 604*Group* buffer search any marked groups, or the group on the current
605current topic. Calling with a prefix-arg prompts for additional 605line, or all the groups under the current topic. Calling with a
606search-engine specific constraints. A non-nil `specs' arg must be 606prefix-arg prompts for additional search-engine specific constraints.
607an alist with `nnir-query-spec' and `nnir-group-spec' keys, and 607A non-nil `specs' arg must be an alist with `nnir-query-spec' and
608skips all prompting." 608`nnir-group-spec' keys, and skips all prompting."
609 (interactive "P") 609 (interactive "P")
610 (let* ((group-spec 610 (let* ((group-spec
611 (or (cdr (assq 'nnir-group-spec specs)) 611 (or (cdr (assq 'nnir-group-spec specs))
@@ -929,7 +929,7 @@ skips all prompting."
929 929
930(defmacro nnir-add-result (dirnam artno score prefix server artlist) 930(defmacro nnir-add-result (dirnam artno score prefix server artlist)
931 "Ask `nnir-compose-result' to construct a result vector, 931 "Ask `nnir-compose-result' to construct a result vector,
932and if it is non-nil, add it to artlist." 932and if it is non-nil, add it to ARTLIST."
933 `(let ((result (nnir-compose-result ,dirnam ,artno ,score ,prefix ,server))) 933 `(let ((result (nnir-compose-result ,dirnam ,artno ,score ,prefix ,server)))
934 (when (not (null result)) 934 (when (not (null result))
935 (push result ,artlist)))) 935 (push result ,artlist))))
@@ -939,7 +939,7 @@ and if it is non-nil, add it to artlist."
939;; Helper function currently used by the Swish++ and Namazu backends; 939;; Helper function currently used by the Swish++ and Namazu backends;
940;; perhaps useful for other backends as well 940;; perhaps useful for other backends as well
941(defun nnir-compose-result (dirnam article score prefix server) 941(defun nnir-compose-result (dirnam article score prefix server)
942 "Extract the group from dirnam, and create a result vector 942 "Extract the group from DIRNAM, and create a result vector
943ready to be added to the list of search results." 943ready to be added to the list of search results."
944 944
945 ;; remove nnir-*-remove-prefix from beginning of dirnam filename 945 ;; remove nnir-*-remove-prefix from beginning of dirnam filename
@@ -977,8 +977,8 @@ ready to be added to the list of search results."
977;; imap interface 977;; imap interface
978(defun nnir-run-imap (query srv &optional groups) 978(defun nnir-run-imap (query srv &optional groups)
979 "Run a search against an IMAP back-end server. 979 "Run a search against an IMAP back-end server.
980This uses a custom query language parser; see `nnir-imap-make-query' for 980This uses a custom query language parser; see `nnir-imap-make-query'
981details on the language and supported extensions." 981for details on the language and supported extensions."
982 (save-excursion 982 (save-excursion
983 (let ((qstring (cdr (assq 'query query))) 983 (let ((qstring (cdr (assq 'query query)))
984 (server (cadr (gnus-server-to-method srv))) 984 (server (cadr (gnus-server-to-method srv)))
@@ -1027,28 +1027,30 @@ details on the language and supported extensions."
1027 "Parse the query string and criteria into an appropriate IMAP search 1027 "Parse the query string and criteria into an appropriate IMAP search
1028expression, returning the string query to make. 1028expression, returning the string query to make.
1029 1029
1030This implements a little language designed to return the expected results 1030This implements a little language designed to return the expected
1031to an arbitrary query string to the end user. 1031results to an arbitrary query string to the end user.
1032 1032
1033The search is always case-insensitive, as defined by RFC2060, and supports 1033The search is always case-insensitive, as defined by RFC2060, and
1034the following features (inspired by the Google search input language): 1034supports the following features (inspired by the Google search input
1035language):
1035 1036
1036Automatic \"and\" queries 1037Automatic \"and\" queries
1037 If you specify multiple words then they will be treated as an \"and\" 1038 If you specify multiple words then they will be treated as an
1038 expression intended to match all components. 1039 \"and\" expression intended to match all components.
1039 1040
1040Phrase searches 1041Phrase searches
1041 If you wrap your query in double-quotes then it will be treated as a 1042 If you wrap your query in double-quotes then it will be treated
1042 literal string. 1043 as a literal string.
1043 1044
1044Negative terms 1045Negative terms
1045 If you precede a term with \"-\" then it will negate that. 1046 If you precede a term with \"-\" then it will negate that.
1046 1047
1047\"OR\" queries 1048\"OR\" queries
1048 If you include an upper-case \"OR\" in your search it will cause the 1049 If you include an upper-case \"OR\" in your search it will cause
1049 term before it and the term after it to be treated as alternatives. 1050 the term before it and the term after it to be treated as
1051 alternatives.
1050 1052
1051In future the following will be added to the language: 1053In the future the following will be added to the language:
1052 * support for date matches 1054 * support for date matches
1053 * support for location of text matching within the query 1055 * support for location of text matching within the query
1054 * from/to/etc headers 1056 * from/to/etc headers
@@ -1060,7 +1062,7 @@ In future the following will be added to the language:
1060 1062
1061 1063
1062(defun nnir-imap-query-to-imap (criteria query) 1064(defun nnir-imap-query-to-imap (criteria query)
1063 "Turn a s-expression format query into IMAP." 1065 "Turn an s-expression format QUERY into IMAP."
1064 (mapconcat 1066 (mapconcat
1065 ;; Turn the expressions into IMAP text 1067 ;; Turn the expressions into IMAP text
1066 (lambda (item) 1068 (lambda (item)
@@ -1072,7 +1074,7 @@ In future the following will be added to the language:
1072 1074
1073 1075
1074(defun nnir-imap-expr-to-imap (criteria expr) 1076(defun nnir-imap-expr-to-imap (criteria expr)
1075 "Convert EXPR into an IMAP search expression on CRITERIA" 1077 "Convert EXPR into an IMAP search expression on CRITERIA."
1076 ;; What sort of expression is this, eh? 1078 ;; What sort of expression is this, eh?
1077 (cond 1079 (cond
1078 ;; Simple string term 1080 ;; Simple string term
@@ -1126,7 +1128,7 @@ that the search language can then understand and use."
1126 1128
1127 1129
1128(defun nnir-imap-next-term (&optional count) 1130(defun nnir-imap-next-term (&optional count)
1129 "Return the next TERM from the current buffer." 1131 "Return the next term from the current buffer."
1130 (let ((term (nnir-imap-next-symbol count))) 1132 (let ((term (nnir-imap-next-symbol count)))
1131 ;; What sort of term is this? 1133 ;; What sort of term is this?
1132 (cond 1134 (cond
@@ -1294,7 +1296,7 @@ Windows NT 4.0."
1294 1296
1295;; Swish-E interface. 1297;; Swish-E interface.
1296(defun nnir-run-swish-e (query server &optional _group) 1298(defun nnir-run-swish-e (query server &optional _group)
1297 "Run given query against swish-e. 1299 "Run given QUERY against swish-e.
1298Returns a vector of (group name, file name) pairs (also vectors, 1300Returns a vector of (group name, file name) pairs (also vectors,
1299actually). 1301actually).
1300 1302
@@ -1460,7 +1462,7 @@ Tested with swish-e-2.0.1 on Windows NT 4.0."
1460 1462
1461;; Namazu interface 1463;; Namazu interface
1462(defun nnir-run-namazu (query server &optional _group) 1464(defun nnir-run-namazu (query server &optional _group)
1463 "Run given query against Namazu. 1465 "Run given QUERY against Namazu.
1464Returns a vector of (group name, file name) pairs (also vectors, 1466Returns a vector of (group name, file name) pairs (also vectors,
1465actually). 1467actually).
1466 1468
@@ -1713,7 +1715,7 @@ construct path: search terms (see the variable
1713 1715
1714(defun nnir-read-parm (parmspec) 1716(defun nnir-read-parm (parmspec)
1715 "Read a single search parameter. 1717 "Read a single search parameter.
1716`parmspec' is a cons cell, the car is a symbol, the cdr is a prompt." 1718PARMSPEC is a cons cell, the car is a symbol, the cdr is a prompt."
1717 (let ((sym (car parmspec)) 1719 (let ((sym (car parmspec))
1718 (prompt (cdr parmspec))) 1720 (prompt (cdr parmspec)))
1719 (if (listp prompt) 1721 (if (listp prompt)
@@ -1742,9 +1744,9 @@ construct path: search terms (see the variable
1742 nnir-method-default-engines)))) 1744 nnir-method-default-engines))))
1743 1745
1744(defun nnir-read-server-parm (key server &optional not-global) 1746(defun nnir-read-server-parm (key server &optional not-global)
1745 "Return the parameter value corresponding to `key' for `server'. 1747 "Return the parameter value corresponding to KEY for SERVER.
1746If no server-specific value is found consult the global 1748If no server-specific value is found consult the global
1747environment unless `not-global' is non-nil." 1749environment unless NOT-GLOBAL is non-nil."
1748 (let ((method (gnus-server-to-method server))) 1750 (let ((method (gnus-server-to-method server)))
1749 (cond ((and method (assq key (cddr method))) 1751 (cond ((and method (assq key (cddr method)))
1750 (nth 1 (assq key (cddr method)))) 1752 (nth 1 (assq key (cddr method))))
@@ -1767,10 +1769,10 @@ environment unless `not-global' is non-nil."
1767(declare-function gnus-registry-get-id-key "gnus-registry" (id key)) 1769(declare-function gnus-registry-get-id-key "gnus-registry" (id key))
1768 1770
1769(defun nnir-search-thread (header) 1771(defun nnir-search-thread (header)
1770 "Make an nnir group based on the thread containing the article 1772 "Make an nnir group based on the thread containing the article HEADER.
1771header. The current server will be searched. If the registry is 1773The current server will be searched. If the registry is installed,
1772installed, the server that the registry reports the current 1774the server that the registry reports the current article came from
1773article came from is also searched." 1775is also searched."
1774 (let* ((query 1776 (let* ((query
1775 (list (cons 'query (nnimap-make-thread-query header)) 1777 (list (cons 'query (nnimap-make-thread-query header))
1776 (cons 'criteria ""))) 1778 (cons 'criteria "")))