Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
bb760c71
Commit
bb760c71
authored
Dec 21, 1997
by
Richard M. Stallman
Browse files
(match-string-no-properties): New function.
parent
255359cb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
lisp/subr.el
lisp/subr.el
+15
-0
No files found.
lisp/subr.el
View file @
bb760c71
...
...
@@ -978,6 +978,21 @@ STRING should be given if the last search was by `string-match' on STRING."
(
substring
string
(
match-beginning
num
)
(
match-end
num
))
(
buffer-substring
(
match-beginning
num
)
(
match-end
num
)))))
(
defun
match-string-no-properties
(
num
&optional
string
)
"Return string of text matched by last search, without text properties.
NUM specifies which parenthesized expression in the last regexp.
Value is nil if NUMth pair didn't match, or there were less than NUM pairs.
Zero means the entire text matched by the whole regexp or whole string.
STRING should be given if the last search was by `string-match' on STRING."
(
if
(
match-beginning
num
)
(
if
string
(
let
((
result
(
substring
string
(
match-beginning
num
)
(
match-end
num
))))
(
set-text-properties
0
(
length
result
)
nil
result
)
result
)
(
buffer-substring-no-properties
(
match-beginning
num
)
(
match-end
num
)))))
(
defun
split-string
(
string
&optional
separators
)
"Splits STRING into substrings where there are matches for SEPARATORS.
Each match for SEPARATORS is a splitting point.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment