]> granicus.if.org Git - python/commitdiff
(py-mark-def-or-class): Added an exchange-point-and-mark and a
authorBarry Warsaw <barry@python.org>
Wed, 26 Nov 1997 06:00:26 +0000 (06:00 +0000)
committerBarry Warsaw <barry@python.org>
Wed, 26 Nov 1997 06:00:26 +0000 (06:00 +0000)
py-keep-region-active so that the marked def/class gets the
zmacs-region or transient-mark region highlighted.  Also point should
be left at the end of the marked region.

(py-mode-map): Moved py-mark-def-or-class to M-C-h to conform to Emacs
major mode standards.

Misc/python-mode.el

index 99795a0fc8607b8ff4e74672bef73673332b1161..624af01986383d4283599691e175947fdaafb57c 100644 (file)
@@ -462,7 +462,7 @@ Currently-active file is at the head of the list.")
     (define-key py-mode-map [delete]    'py-electric-delete)
     (define-key py-mode-map [backspace] 'py-electric-backspace))
   ;; marking interesting locations
-  (define-key py-mode-map "\C-c\C-m"  'py-mark-def-or-class)
+  (define-key py-mode-map "\e\C-h"    'py-mark-def-or-class)
   (define-key py-mode-map "\C-c\C-k"  'py-mark-block)
   ;; Miscellaneous
   (define-key py-mode-map "\C-c:"     'py-guess-indent-offset)
@@ -2049,7 +2049,9 @@ pleasant."
                     (re-search-backward "^[ \t]*[^ \t#]" nil 'move)
                     (forward-line 1))
                  ;; no comment, so go back
-                 (goto-char start))))))))
+                 (goto-char start)))))))
+  (exchange-point-and-mark)
+  (py-keep-region-active))
 
 ;; ripped from cc-mode
 (defun py-forward-into-nomenclature (&optional arg)