changeset 82788:eeb100f7184f

(locate-get-file-positions): Use `line-beginning-position' and `line-end-position'.
author Thien-Thi Nguyen <ttn@gnuvola.org>
date Thu, 23 Aug 2007 18:41:01 +0000
parents 03ac28e9a566
children 4ca3b6194ff8
files lisp/locate.el
diffstat 1 files changed, 4 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/locate.el	Thu Aug 23 18:37:08 2007 +0000
+++ b/lisp/locate.el	Thu Aug 23 18:41:01 2007 +0000
@@ -406,14 +406,10 @@
 meaningless.  You can check whether the current line contains a file
 listed by the locate program, using the function
 `locate-main-listing-line-p'."
-  (save-excursion
-    (end-of-line)
-    (let ((eol (point)))
-      (beginning-of-line)
-
-      ;; Assumes names end at the end of the line
-      (forward-char locate-filename-indentation)
-      (list (point) eol))))
+  (list (+ locate-filename-indentation
+           (line-beginning-position))
+        ;; Assume names end at the end of the line.
+        (line-end-position)))
 
 ;; From SQL-mode
 (defun locate-current-line-number ()