diff options
author | Thien-Thi Nguyen <ttn@gnuvola.org> | 2007-08-23 18:41:59 +0000 |
---|---|---|
committer | Thien-Thi Nguyen <ttn@gnuvola.org> | 2007-08-23 18:41:59 +0000 |
commit | 25ca95c050c42865a6039f028786d7feb15e841a (patch) | |
tree | c6616f01bc1408fceb5701dfa3c3658982982453 | |
parent | 305c237ca2cae42cf14b1c6dbd57b419b44b1c4b (diff) | |
download | emacs-25ca95c050c42865a6039f028786d7feb15e841a.tar.gz |
(locate-get-file-positions): Use
`line-beginning-position' and `line-end-position'.
-rw-r--r-- | lisp/ChangeLog | 5 | ||||
-rw-r--r-- | lisp/locate.el | 12 |
2 files changed, 9 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2ed0159ce82..947682cdc17 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2007-08-23 Thien-Thi Nguyen <ttn@gnuvola.org> + + * locate.el (locate-get-file-positions): Use + line-beginning-position and line-end-position. + 2007-08-23 John Wiegley <johnw@newartisans.com> * calendar/cal-bahai.el: Added in the diacriticals that were diff --git a/lisp/locate.el b/lisp/locate.el index 95060d36197..bc2dce954da 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 () |