Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
dde92ca6
Commit
dde92ca6
authored
Mar 29, 1993
by
Richard M. Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(count-lines): Use save-match-data.
parent
125def1c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
12 deletions
+13
-12
lisp/simple.el
lisp/simple.el
+13
-12
No files found.
lisp/simple.el
View file @
dde92ca6
...
...
@@ -321,6 +321,7 @@ that uses or sets the mark."
This is usually the number of newlines between them,
but can be one more if START is not equal to END
and the greater of them is not at the start of a line."
(
save-match-data
(
save-excursion
(
save-restriction
(
narrow-to-region
start
end
)
...
...
@@ -332,7 +333,7 @@ and the greater of them is not at the start of a line."
(
while
(
re-search-forward
"[\n\C-m]"
nil
t
1
)
(
setq
done
(
+
1
done
)))
done
)
(
-
(
buffer-size
)
(
forward-line
(
buffer-size
)))))))
(
-
(
buffer-size
)
(
forward-line
(
buffer-size
)))))))
)
(
defun
what-cursor-position
()
"Print info on cursor position (on screen and within buffer)."
...
...
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