Mercurial > emacs
comparison lisp/subr.el @ 53994:342806d7b32b
(match-string-no-properties): Use substring-no-properties.
author | Eli Zaretskii <eliz@is.elta.co.il> |
---|---|
date | Mon, 16 Feb 2004 17:03:40 +0000 |
parents | ee432d9e3bbd |
children | 15b3e94eebd4 |
comparison
equal
deleted
inserted
replaced
53993:c164b0961497 | 53994:342806d7b32b |
---|---|
1983 Value is nil if NUMth pair didn't match, or there were less than NUM pairs. | 1983 Value is nil if NUMth pair didn't match, or there were less than NUM pairs. |
1984 Zero means the entire text matched by the whole regexp or whole string. | 1984 Zero means the entire text matched by the whole regexp or whole string. |
1985 STRING should be given if the last search was by `string-match' on STRING." | 1985 STRING should be given if the last search was by `string-match' on STRING." |
1986 (if (match-beginning num) | 1986 (if (match-beginning num) |
1987 (if string | 1987 (if string |
1988 (let ((result | 1988 (substring-no-properties string (match-beginning num) |
1989 (substring string (match-beginning num) (match-end num)))) | 1989 (match-end num)) |
1990 (set-text-properties 0 (length result) nil result) | |
1991 result) | |
1992 (buffer-substring-no-properties (match-beginning num) | 1990 (buffer-substring-no-properties (match-beginning num) |
1993 (match-end num))))) | 1991 (match-end num))))) |
1994 | 1992 |
1995 (defun looking-back (regexp &optional limit) | 1993 (defun looking-back (regexp &optional limit) |
1996 "Return non-nil if text before point matches regular expression REGEXP. | 1994 "Return non-nil if text before point matches regular expression REGEXP. |