diff options
| author | Glenn Morris | 2009-08-21 07:31:10 +0000 |
|---|---|---|
| committer | Glenn Morris | 2009-08-21 07:31:10 +0000 |
| commit | d93e053bb544bca58f9d993c538ce45a6946cef6 (patch) | |
| tree | 7d5e8108d78cd924d006d17d32762996861dc78d | |
| parent | d5d105e863bbbcaad1cdb89b4cd4e74fd5815fe6 (diff) | |
| download | emacs-d93e053bb544bca58f9d993c538ce45a6946cef6.tar.gz emacs-d93e053bb544bca58f9d993c538ce45a6946cef6.zip | |
(ns-open-file-select-line): Use line-beginning-position rather than goto-line.
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/term/ns-win.el | 21 |
2 files changed, 15 insertions, 9 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5cd5ec74fe8..e73697dcf0d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2009-08-21 Glenn Morris <rgm@gnu.org> | 1 | 2009-08-21 Glenn Morris <rgm@gnu.org> |
| 2 | 2 | ||
| 3 | * term/ns-win.el (ns-open-file-select-line): | ||
| 4 | Use line-beginning-position rather than goto-line. | ||
| 5 | |||
| 3 | * apropos.el (apropos-command): | 6 | * apropos.el (apropos-command): |
| 4 | * ehelp.el (electric-helpify): | 7 | * ehelp.el (electric-helpify): |
| 5 | * printing.el (pr-show-setup): | 8 | * printing.el (pr-show-setup): |
diff --git a/lisp/term/ns-win.el b/lisp/term/ns-win.el index ad026e6fd0d..4435b6cbf04 100644 --- a/lisp/term/ns-win.el +++ b/lisp/term/ns-win.el | |||
| @@ -728,18 +728,21 @@ Lines are highlighted according to `ns-input-line'." | |||
| 728 | ns-input-line))) | 728 | ns-input-line))) |
| 729 | (ns-input-line | 729 | (ns-input-line |
| 730 | (if (not ns-select-overlay) | 730 | (if (not ns-select-overlay) |
| 731 | (overlay-put (setq ns-select-overlay (make-overlay (point-min) (point-min))) | 731 | (overlay-put (setq ns-select-overlay (make-overlay (point-min) |
| 732 | (point-min))) | ||
| 732 | 'face 'highlight)) | 733 | 'face 'highlight)) |
| 733 | (let ((beg (save-excursion | 734 | (let ((beg (save-excursion |
| 734 | (goto-line (if (consp ns-input-line) | 735 | (goto-char (point-min)) |
| 735 | (min (car ns-input-line) (cdr ns-input-line)) | 736 | (line-beginning-position |
| 736 | ns-input-line)) | 737 | (if (consp ns-input-line) |
| 737 | (point))) | 738 | (min (car ns-input-line) (cdr ns-input-line)) |
| 739 | ns-input-line)))) | ||
| 738 | (end (save-excursion | 740 | (end (save-excursion |
| 739 | (goto-line (+ 1 (if (consp ns-input-line) | 741 | (goto-char (point-min)) |
| 740 | (max (car ns-input-line) (cdr ns-input-line)) | 742 | (line-beginning-position |
| 741 | ns-input-line))) | 743 | (1+ (if (consp ns-input-line) |
| 742 | (point)))) | 744 | (max (car ns-input-line) (cdr ns-input-line)) |
| 745 | ns-input-line)))))) | ||
| 743 | (move-overlay ns-select-overlay beg end) | 746 | (move-overlay ns-select-overlay beg end) |
| 744 | (deactivate-mark) | 747 | (deactivate-mark) |
| 745 | (goto-char beg))) | 748 | (goto-char beg))) |