]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
(py-keep-region-active): new function.
authorBarry Warsaw <barry@python.org>
Wed, 8 Mar 1995 22:05:16 +0000 (22:05 +0000)
committerBarry Warsaw <barry@python.org>
Wed, 8 Mar 1995 22:05:16 +0000 (22:05 +0000)
Misc/python-mode.el

index 29d61a8396e2f664daaa9b1c8f709ee5f48161c2..43a43e374bf8e65112980ee6c8602e0d86f3a4e0 100644 (file)
@@ -1553,7 +1553,6 @@ local bindings to py-newline-and-indent."))
 
 \f
 ;; Helper functions
-
 (defvar py-parse-state-re
   (concat
    "^[ \t]*\\(if\\|elif\\|else\\|while\\|def\\|class\\)\\>"
@@ -1795,6 +1794,13 @@ local bindings to py-newline-and-indent."))
     (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)))
 
 \f
 (defconst py-version "$Revision$"