summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>1997-11-26 06:00:26 (GMT)
committerBarry Warsaw <barry@python.org>1997-11-26 06:00:26 (GMT)
commit4da6bd51dddfb4cfef2853756c4d9ab14c0897f1 (patch)
tree74e807f004b5c3dfb99df22d99068b9674424276 /Misc
parente467bfbfe96d07141fd86fb3b404fa407ed7d128 (diff)
downloadcpython-4da6bd51dddfb4cfef2853756c4d9ab14c0897f1.zip
cpython-4da6bd51dddfb4cfef2853756c4d9ab14c0897f1.tar.gz
cpython-4da6bd51dddfb4cfef2853756c4d9ab14c0897f1.tar.bz2
(py-mark-def-or-class): Added an exchange-point-and-mark and a
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.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/python-mode.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/Misc/python-mode.el b/Misc/python-mode.el
index 99795a0..624af01 100644
--- a/Misc/python-mode.el
+++ b/Misc/python-mode.el
@@ -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)