mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
Merged from miles@gnu.org--gnu-2005 (patch 74-79, 332-349)
Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-332 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-333 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-334 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-335 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-336 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-337 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-338 etc/emacs-buffer.gdb: Remove RCS keywords * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-339 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-340 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-341 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-342 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-343 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-344 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-345 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-346 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-347 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-348 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-349 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-74 Merge from emacs--cvs-trunk--0 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-75 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-76 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-77 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-78 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-79 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-349
This commit is contained in:
commit
8736257554
135 changed files with 3780 additions and 1816 deletions
30
lisp/subr.el
30
lisp/subr.el
|
|
@ -2008,14 +2008,34 @@ STRING should be given if the last search was by `string-match' on STRING."
|
|||
(buffer-substring-no-properties (match-beginning num)
|
||||
(match-end num)))))
|
||||
|
||||
(defun looking-back (regexp &optional limit)
|
||||
(defun looking-back (regexp &optional limit greedy)
|
||||
"Return non-nil if text before point matches regular expression REGEXP.
|
||||
Like `looking-at' except matches before point, and is slower.
|
||||
LIMIT if non-nil speeds up the search by specifying how far back the
|
||||
match can start."
|
||||
(not (null
|
||||
(save-excursion
|
||||
(re-search-backward (concat "\\(?:" regexp "\\)\\=") limit t)))))
|
||||
match can start.
|
||||
|
||||
If GREEDY is non-nil, extend the match backwards as far as possible,
|
||||
stopping when a single additional previous character cannot be part
|
||||
of a match for REGEXP."
|
||||
(let ((start (point))
|
||||
(pos
|
||||
(save-excursion
|
||||
(and (re-search-backward (concat "\\(?:" regexp "\\)\\=") limit t)
|
||||
(point)))))
|
||||
(if (and greedy pos)
|
||||
(save-restriction
|
||||
(narrow-to-region (point-min) start)
|
||||
(while (and (> pos (point-min))
|
||||
(save-excursion
|
||||
(goto-char pos)
|
||||
(backward-char 1)
|
||||
(looking-at (concat "\\(?:" regexp "\\)\\'"))))
|
||||
(setq pos (1- pos)))
|
||||
(save-excursion
|
||||
(goto-char pos)
|
||||
(looking-at (concat "\\(?:" regexp "\\)\\'")))))
|
||||
(not (null pos))))
|
||||
|
||||
|
||||
(defconst split-string-default-separators "[ \f\t\n\r\v]+"
|
||||
"The default value of separators for `split-string'.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue