浏览代码

Make sure the region in XEmacs stays when using Org's special
beginning-of-line and end-of-line commands.

Carsten Dominik 17 年之前
父节点
当前提交
b8c3e861ae
共有 2 个文件被更改,包括 12 次插入2 次删除
  1. 5 0
      lisp/ChangeLog
  2. 7 2
      lisp/org.el

+ 5 - 0
lisp/ChangeLog

@@ -1,3 +1,8 @@
+2008-06-12  Carsten Dominik  <dominik@science.uva.nl>
+
+	* org.el (org-beginning-of-line, org-end-of-line): Make sure the
+	zmacs-region stays after this command in XEmacs.
+
 2008-06-11  Carsten Dominik  <dominik@science.uva.nl>
 
 	* org.el (org-scan-tags): Allow new values for ACTION parameter.

+ 7 - 2
lisp/org.el

@@ -14051,7 +14051,9 @@ beyond the end of the headline."
 		   (t (point)))
 	   (cond ((> pos (point)) (point))
 		 ((not (eq last-command this-command)) (point))
-		 (t (match-end 4))))))))))
+		 (t (match-end 4))))))))
+    (org-no-warnings
+     (and (featurep 'xemacs) (setq zmacs-region-stays t)))))
 
 (defun org-end-of-line (&optional arg)
   "Go to the end of the line.
@@ -14073,7 +14075,10 @@ beyond the end of the headline."
 	    (if (or (< pos (match-end 0)) (not (eq this-command last-command)))
 		(goto-char (match-end 0))
 	      (goto-char (match-beginning 1))))
-	(end-of-line arg)))))
+	(end-of-line arg))))
+  (org-no-warnings
+   (and (featurep 'xemacs) (setq zmacs-region-stays t))))
+
 
 (define-key org-mode-map "\C-a" 'org-beginning-of-line)
 (define-key org-mode-map "\C-e" 'org-end-of-line)