diff options
Diffstat (limited to 'lisp/locate.el')
-rw-r--r-- | lisp/locate.el | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/lisp/locate.el b/lisp/locate.el index a2e12f331a8..2522add1742 100644 --- a/lisp/locate.el +++ b/lisp/locate.el @@ -406,14 +406,10 @@ there is no file name on the current line, the return value is 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 () |