From 108b164dd845dec7fddc154996be9a0ac8e89088 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Sat, 12 Apr 2008 02:00:46 +0000 Subject: [PATCH] (mac-ae-open-documents): Adjust selection range parameter origins. --- lisp/ChangeLog | 5 +++++ lisp/term/mac-win.el | 10 +++++----- 2 files changed, 10 insertions(+), 5 deletions(-) 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) "\\|") -- 2.11.4.GIT