From: YAMAMOTO Mitsuharu Date: Sat, 12 Apr 2008 02:00:46 +0000 (+0000) Subject: (mac-ae-open-documents): Adjust selection range parameter origins. X-Git-Tag: emacs-pretest-22.2.90~187 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=108b164dd845dec7fddc154996be9a0ac8e89088;p=emacs.git (mac-ae-open-documents): Adjust selection range parameter origins. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b0b66d05b77..292561e6bb9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2008-04-12 YAMAMOTO Mitsuharu + + * term/mac-win.el (mac-ae-open-documents): Adjust selection range + parameter origins. + 2008-04-11 Stefan Monnier * progmodes/python.el (python-mode): Don't mess with hippie-expand. diff --git a/lisp/term/mac-win.el b/lisp/term/mac-win.el index c9c13c7814e..eaa0e35fa5b 100644 --- a/lisp/term/mac-win.el +++ b/lisp/term/mac-win.el @@ -1738,11 +1738,11 @@ if possible. If there's no such frame, a new frame is created." (let ((line (car selection-range)) (start (cadr selection-range)) (end (nth 2 selection-range))) - (if (> line 0) - (goto-line line) - (if (and (> start 0) (> end 0)) - (progn (set-mark start) - (goto-char end)))))) + (if (>= line 0) + (goto-line (1+ line)) + (if (and (>= start 0) (>= end 0)) + (progn (set-mark (1+ start)) + (goto-char (1+ end))))))) ((stringp search-text) (re-search-forward (mapconcat 'regexp-quote (split-string search-text) "\\|")