From: Gerd Moellmann Date: Tue, 12 Oct 1999 11:48:43 +0000 (+0000) Subject: (quickurl-list-insert): `count-lines' was returning X-Git-Tag: emacs-pretest-21.0.90~6471 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b07ea410a382deb8e8eae336302cc085269c8342;p=emacs.git (quickurl-list-insert): `count-lines' was returning a value one line to high if the cursor wasn't at the start of a line. A `beginning-of-line' is now performed before making the call to `count-lines'. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index bd0d9840b6f..bdb1f3c6bf3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +1999-10-12 Dave Pearson + + * quickurl.el (quickurl-list-insert): `count-lines' was returning + a value one line to high if the cursor wasn't at the start of a + line. A `beginning-of-line' is now performed before making the + call to `count-lines'. + 1999-10-11 Stefan Monnier * diff-mode.el (vc-backend-diff): get rid of the autoloaded advice. diff --git a/lisp/quickurl.el b/lisp/quickurl.el index 3089e44754d..71d73ffd541 100644 --- a/lisp/quickurl.el +++ b/lisp/quickurl.el @@ -506,7 +506,10 @@ TYPE dictates what will be inserted, options are: `with-lookup' - Insert \"lookup \" `with-desc' - Insert \"description \" `lookup' - Insert the lookup for that URL" - (let ((url (nth (count-lines (point-min) (point)) quickurl-urls))) + (let ((url (nth (save-excursion + (beginning-of-line) + (count-lines (point-min) (point))) + quickurl-urls))) (if url (with-current-buffer quickurl-list-last-buffer (insert