diff options
| author | Thien-Thi Nguyen | 2007-08-23 18:41:59 +0000 |
|---|---|---|
| committer | Thien-Thi Nguyen | 2007-08-23 18:41:59 +0000 |
| commit | 25ca95c050c42865a6039f028786d7feb15e841a (patch) | |
| tree | c6616f01bc1408fceb5701dfa3c3658982982453 | |
| parent | 305c237ca2cae42cf14b1c6dbd57b419b44b1c4b (diff) | |
| download | emacs-25ca95c050c42865a6039f028786d7feb15e841a.tar.gz emacs-25ca95c050c42865a6039f028786d7feb15e841a.zip | |
(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 @@ | |||
| 1 | 2007-08-23 Thien-Thi Nguyen <ttn@gnuvola.org> | ||
| 2 | |||
| 3 | * locate.el (locate-get-file-positions): Use | ||
| 4 | line-beginning-position and line-end-position. | ||
| 5 | |||
| 1 | 2007-08-23 John Wiegley <johnw@newartisans.com> | 6 | 2007-08-23 John Wiegley <johnw@newartisans.com> |
| 2 | 7 | ||
| 3 | * calendar/cal-bahai.el: Added in the diacriticals that were | 8 | * 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 | |||
| 406 | meaningless. You can check whether the current line contains a file | 406 | meaningless. You can check whether the current line contains a file |
| 407 | listed by the locate program, using the function | 407 | listed by the locate program, using the function |
| 408 | `locate-main-listing-line-p'." | 408 | `locate-main-listing-line-p'." |
| 409 | (save-excursion | 409 | (list (+ locate-filename-indentation |
| 410 | (end-of-line) | 410 | (line-beginning-position)) |
| 411 | (let ((eol (point))) | 411 | ;; Assume names end at the end of the line. |
| 412 | (beginning-of-line) | 412 | (line-end-position))) |
| 413 | |||
| 414 | ;; Assumes names end at the end of the line | ||
| 415 | (forward-char locate-filename-indentation) | ||
| 416 | (list (point) eol)))) | ||
| 417 | 413 | ||
| 418 | ;; From SQL-mode | 414 | ;; From SQL-mode |
| 419 | (defun locate-current-line-number () | 415 | (defun locate-current-line-number () |