1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-30 12:21:25 -08:00

Merge from origin/emacs-25

f1247f0 * lisp/frame.el (blink-cursor-delay): Doc fix.  (Bug#24372)
ace7f14 * lisp/gnus/gnus-art.el (gnus-button-handle-library): Fix typo.
bbf1ffd Regexp Functions doc minor fixes
This commit is contained in:
Paul Eggert 2016-10-10 07:35:31 -07:00
commit 4e42e8453e
3 changed files with 28 additions and 23 deletions

View file

@ -950,37 +950,41 @@ more efficient, but is almost never worth the effort.}.
The optional argument @var{paren} can be any of the following:
a string
the resulting regexp is preceded by @var{paren} and followed by
@samp{\)}, e.g. use @samp{"\\(?1:"} to produce an explicitly
numbered group.
@table @asis
@item a string
The resulting regexp is preceded by @var{paren} and followed by
@samp{\)}, e.g. use @samp{"\\(?1:"} to produce an explicitly
numbered group.
@code{words}
the resulting regexp is surrounded by @samp{\<\(} and @samp{\)\>}.
@item @code{words}
The resulting regexp is surrounded by @samp{\<\(} and @samp{\)\>}.
@code{symbols}
the resulting regexp is surrounded by @samp{\_<\(} and @samp{\)\_>}
(this is often appropriate when maching programming-language
keywords and the like).
@item @code{symbols}
The resulting regexp is surrounded by @samp{\_<\(} and @samp{\)\_>}
(this is often appropriate when matching programming-language
keywords and the like).
non-@code{nil}
the resulting regexp is surrounded by @samp{\(} and @samp{\)}.
@item non-@code{nil}
The resulting regexp is surrounded by @samp{\(} and @samp{\)}.
@code{nil}
the resulting regexp is surrounded by @samp{\(?:} and @samp{\)},
if it is necessary to ensure that a postfix operator appended to
it will apply to the whole expression.
@item @code{nil}
The resulting regexp is surrounded by @samp{\(?:} and @samp{\)},
if it is necessary to ensure that a postfix operator appended to
it will apply to the whole expression.
@end table
The resulting regexp of @code{regexp-opt} is equivalent to but usually
more efficient than that of a simplified version:
@example
(defun simplified-regexp-opt (strings &optional paren)
(let ((parens (cond ((stringp paren) (cons paren "\\)"))
((eq paren 'words) '("\\<\\(" . "\\)\\>"))
((eq paren 'symbols) '("\\_<\\(" . "\\)\\_>"))
((null paren) '("\\(?:" . "\\)"))
(t '("\\(" . "\\)")))))
(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))))

View file

@ -2036,7 +2036,8 @@ This timer calls `blink-cursor-timer-function' every
:group 'frames)
(defcustom blink-cursor-delay 0.5
"Seconds of idle time after which cursor starts to blink."
"Seconds of idle time before the first blink of the cursor.
Values smaller than 0.2 sec are treated as 0.2 sec."
:type 'number
:group 'cursor
:set (lambda (symbol value)

View file

@ -7639,7 +7639,7 @@ Calls `describe-variable' or `describe-function'."
(let* ((lib (locate-library url))
(file (replace-regexp-in-string "\\.elc" ".el" (or lib ""))))
(if (not lib)
(gnus-message 1 "Cannot locale library `%s'." url)
(gnus-message 1 "Cannot locate library `%s'." url)
(find-file-read-only file))))
(defcustom gnus-button-man-level 5