]> git.eshelyaron.com Git - emacs.git/commitdiff
(quickurl-list-insert): `count-lines' was returning
authorGerd Moellmann <gerd@gnu.org>
Tue, 12 Oct 1999 11:48:43 +0000 (11:48 +0000)
committerGerd Moellmann <gerd@gnu.org>
Tue, 12 Oct 1999 11:48:43 +0000 (11:48 +0000)
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'.

lisp/ChangeLog
lisp/quickurl.el

index bd0d9840b6f338513bd36a3ff54db8b4243786ca..bdb1f3c6bf38bc84ffb4054303e07d44065ac318 100644 (file)
@@ -1,3 +1,10 @@
+1999-10-12  Dave Pearson  <davep@hagbard.demon.co.uk>
+
+        * 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  <monnier@cs.yale.edu>
 
        * diff-mode.el (vc-backend-diff): get rid of the autoloaded advice.
index 3089e44754dd693274b765eef50c20271f250fb4..71d73ffd541e37ef20386d4d196284b1c6805272 100644 (file)
@@ -506,7 +506,10 @@ TYPE dictates what will be inserted, options are:
   `with-lookup' - Insert \"lookup <URL:url>\"
   `with-desc'   - Insert \"description <URL:url>\"
   `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