]> git.eshelyaron.com Git - emacs.git/commitdiff
(ns-open-file-select-line): Use line-beginning-position rather than goto-line.
authorGlenn Morris <rgm@gnu.org>
Fri, 21 Aug 2009 07:31:10 +0000 (07:31 +0000)
committerGlenn Morris <rgm@gnu.org>
Fri, 21 Aug 2009 07:31:10 +0000 (07:31 +0000)
lisp/ChangeLog
lisp/term/ns-win.el

index 5cd5ec74fe84047d56285d7b1cd8a9bee3e56e4f..e73697dcf0df7d636f4222d2602d15f43eb6be0f 100644 (file)
@@ -1,5 +1,8 @@
 2009-08-21  Glenn Morris  <rgm@gnu.org>
 
+       * term/ns-win.el (ns-open-file-select-line):
+       Use line-beginning-position rather than goto-line.
+
        * apropos.el (apropos-command):
        * ehelp.el (electric-helpify):
        * printing.el (pr-show-setup):
index ad026e6fd0d3c65fc77e8f8e062af7b287767483..4435b6cbf04d3ccb3796a183e6cd4b8dc54ea98b 100644 (file)
@@ -728,18 +728,21 @@ Lines are highlighted according to `ns-input-line'."
                  ns-input-line)))
    (ns-input-line
     (if (not ns-select-overlay)
-        (overlay-put (setq ns-select-overlay (make-overlay (point-min) (point-min)))
+        (overlay-put (setq ns-select-overlay (make-overlay (point-min)
+                                                           (point-min)))
                      'face 'highlight))
     (let ((beg (save-excursion
-                 (goto-line (if (consp ns-input-line)
-                                (min (car ns-input-line) (cdr ns-input-line))
-                              ns-input-line))
-                 (point)))
+                 (goto-char (point-min))
+                 (line-beginning-position
+                  (if (consp ns-input-line)
+                      (min (car ns-input-line) (cdr ns-input-line))
+                    ns-input-line))))
           (end (save-excursion
-                 (goto-line (+ 1 (if (consp ns-input-line)
-                                     (max (car ns-input-line) (cdr ns-input-line))
-                                   ns-input-line)))
-                 (point))))
+                 (goto-char (point-min))
+                 (line-beginning-position
+                  (1+ (if (consp ns-input-line)
+                          (max (car ns-input-line) (cdr ns-input-line))
+                        ns-input-line))))))
       (move-overlay ns-select-overlay beg end)
       (deactivate-mark)
       (goto-char beg)))