diff Misc/python-mode.el @ 2498:ddf60bc7ed30 legacy-trunk

(py-keep-region-active): new function.
author Barry Warsaw <barry@python.org>
date Wed, 08 Mar 1995 22:05:16 +0000
parents 15a86687f838
children c221957a626d
line wrap: on
line diff
--- a/Misc/python-mode.el	Wed Mar 08 22:03:16 1995 +0000
+++ b/Misc/python-mode.el	Wed Mar 08 22:05:16 1995 +0000
@@ -1553,7 +1553,6 @@
 
 
 ;; Helper functions
-
 (defvar py-parse-state-re
   (concat
    "^[ \t]*\\(if\\|elif\\|else\\|while\\|def\\|class\\)\\>"
@@ -1795,6 +1794,13 @@
     (set-buffer cbuf))
   (sit-for 0))
 
+(defun py-keep-region-active ()
+  ;; do whatever is necessary to keep the region active in XEmacs.
+  ;; Ignore byte-compiler warnings you might see.  Also note that
+  ;; FSF's Emacs 19 does it differently and doesn't its policy doesn't
+  ;; require us to take explicit action.
+  (and (boundp 'zmacs-region-stays)
+       (setq zmacs-region-stays t)))
 
 
 (defconst py-version "$Revision$"