# HG changeset patch # User Thien-Thi Nguyen # Date 1187894461 0 # Node ID eeb100f7184fb83fb616351f197f388d7b2e8487 # Parent 03ac28e9a5664246329673a698c4ef1b5331ae03 (locate-get-file-positions): Use `line-beginning-position' and `line-end-position'. diff -r 03ac28e9a566 -r eeb100f7184f lisp/locate.el --- 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 ()