summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/calendar/calendar.el6
-rw-r--r--lisp/emacs-lisp/gv.el2
-rw-r--r--lisp/emacs-lisp/regexp-opt.el46
-rw-r--r--lisp/emacs-lisp/seq.el2
-rw-r--r--lisp/progmodes/etags.el2
-rw-r--r--lisp/url/url-http.el7
6 files changed, 45 insertions, 20 deletions
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el
index ccdae484fa6..7a2b3fe1563 100644
--- a/lisp/calendar/calendar.el
+++ b/lisp/calendar/calendar.el
@@ -905,7 +905,7 @@ styles."
'(propertize (format "%s %d" (calendar-month-name month) year)
'font-lock-face 'calendar-month-header)
"Default format for calendar month headings with the American date style.
-Normally you should not customize this, but `calender-month-header'."
+Normally you should not customize this, but `calendar-month-header'."
:group 'calendar
:risky t
:type 'sexp
@@ -915,7 +915,7 @@ Normally you should not customize this, but `calender-month-header'."
'(propertize (format "%s %d" (calendar-month-name month) year)
'font-lock-face 'calendar-month-header)
"Default format for calendar month headings with the European date style.
-Normally you should not customize this, but `calender-month-header'."
+Normally you should not customize this, but `calendar-month-header'."
:group 'calendar
:risky t
:type 'sexp
@@ -925,7 +925,7 @@ Normally you should not customize this, but `calender-month-header'."
'(propertize (format "%d %s" year (calendar-month-name month))
'font-lock-face 'calendar-month-header)
"Default format for calendar month headings with the ISO date style.
-Normally you should not customize this, but `calender-month-header'."
+Normally you should not customize this, but `calendar-month-header'."
:group 'calendar
:risky t
:type 'sexp
diff --git a/lisp/emacs-lisp/gv.el b/lisp/emacs-lisp/gv.el
index 93572e5e658..fa7ac64bf04 100644
--- a/lisp/emacs-lisp/gv.el
+++ b/lisp/emacs-lisp/gv.el
@@ -536,7 +536,7 @@ This macro only makes sense when used in a place."
"Return a reference to PLACE.
This is like the `&' operator of the C language.
Note: this only works reliably with lexical binding mode, except for very
-simple PLACEs such as (function-symbol \\='foo) which will also work in dynamic
+simple PLACEs such as (symbol-function \\='foo) which will also work in dynamic
binding mode."
(let ((code
(gv-letplace (getter setter) place
diff --git a/lisp/emacs-lisp/regexp-opt.el b/lisp/emacs-lisp/regexp-opt.el
index cf6653046b5..ef752858a4c 100644
--- a/lisp/emacs-lisp/regexp-opt.el
+++ b/lisp/emacs-lisp/regexp-opt.el
@@ -86,18 +86,44 @@
;;;###autoload
(defun regexp-opt (strings &optional paren)
"Return a regexp to match a string in the list STRINGS.
-Each string should be unique in STRINGS and should not contain any regexps,
-quoted or not. If optional PAREN is non-nil, ensure that the returned regexp
-is enclosed by at least one regexp grouping construct.
-The returned regexp is typically more efficient than the equivalent regexp:
+Each string should be unique in STRINGS and should not contain
+any regexps, quoted or not. Optional PAREN specifies how the
+returned regexp is surrounded by grouping constructs.
- (let ((open (if PAREN \"\\\\(\" \"\")) (close (if PAREN \"\\\\)\" \"\")))
- (concat open (mapconcat \\='regexp-quote STRINGS \"\\\\|\") close))
+The optional argument PAREN can be any of the following:
-If PAREN is `words', then the resulting regexp is additionally surrounded
-by \\=\\< and \\>.
-If PAREN is `symbols', then the resulting regexp is additionally surrounded
-by \\=\\_< and \\_>."
+a string
+ the resulting regexp is preceded by PAREN and followed by
+ \\), e.g. use \"\\\\(?1:\" to produce an explicitly numbered
+ group.
+
+`words'
+ the resulting regexp is surrounded by \\=\\<\\( and \\)\\>.
+
+`symbols'
+ the resulting regexp is surrounded by \\_<\\( and \\)\\_>.
+
+non-nil
+ the resulting regexp is surrounded by \\( and \\).
+
+nil
+ the resulting regexp is surrounded by \\(?: and \\), if it is
+ necessary to ensure that a postfix operator appended to it will
+ apply to the whole expression.
+
+The resulting regexp is equivalent to but usually more efficient
+than that of a simplified version:
+
+ (defun simplified-regexp-opt (strings &optional paren)
+ (let ((parens
+ (cond ((stringp paren) (cons paren \"\\\\)\"))
+ ((eq paren 'words) '(\"\\\\\\=<\\\\(\" . \"\\\\)\\\\>\"))
+ ((eq paren 'symbols) '(\"\\\\_<\\\\(\" . \"\\\\)\\\\_>\"))
+ ((null paren) '(\"\\\\(?:\" . \"\\\\)\"))
+ (t '(\"\\\\(\" . \"\\\\)\")))))
+ (concat (car paren)
+ (mapconcat 'regexp-quote strings \"\\\\|\")
+ (cdr paren))))"
(save-match-data
;; Recurse on the sorted list.
(let* ((max-lisp-eval-depth 10000)
diff --git a/lisp/emacs-lisp/seq.el b/lisp/emacs-lisp/seq.el
index e5004f8cdab..9859f28f8e8 100644
--- a/lisp/emacs-lisp/seq.el
+++ b/lisp/emacs-lisp/seq.el
@@ -137,7 +137,7 @@ the sequence, and its index within the sequence."
(cl-defgeneric seq-subseq (sequence start &optional end)
"Return the sequence of elements of SEQUENCE from START to END.
-END is inclusive.
+END is exclusive.
If END is omitted, it defaults to the length of the sequence. If
START or END is negative, it counts from the end. Signal an
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el
index 890d55294cf..d37ab8a9817 100644
--- a/lisp/progmodes/etags.el
+++ b/lisp/progmodes/etags.el
@@ -1880,8 +1880,6 @@ Third arg DELIMITED (prefix arg) means replace only word-delimited matches.
If you exit (\\[keyboard-quit], RET or q), you can resume the query replace
with the command \\[tags-loop-continue].
Fourth arg FILE-LIST-FORM non-nil means initialize the replacement loop.
-Fifth and sixth arguments START and END are accepted, for compatibility
-with `query-replace-regexp', and ignored.
If FILE-LIST-FORM is non-nil, it is a form to evaluate to
produce the list of files to search.
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el
index 927d0bb8d57..81bb9b4721e 100644
--- a/lisp/url/url-http.el
+++ b/lisp/url/url-http.el
@@ -366,9 +366,10 @@ The string is based on `url-privacy-level' and `url-user-agent'."
auth
;; Cookies
(when (url-use-cookies url-http-target-url)
- (url-cookie-generate-header-lines
- host real-fname
- (equal "https" (url-type url-http-target-url))))
+ (url-http--encode-string
+ (url-cookie-generate-header-lines
+ host real-fname
+ (equal "https" (url-type url-http-target-url)))))
;; If-modified-since
(if (and (not no-cache)
(member url-http-method '("GET" nil)))