Created
April 27, 2010 18:23
-
-
Save aufrank/381099 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun mark-line (&optional arg) | |
(interactive "p") | |
(beginning-of-line) | |
(let ((here (point))) | |
(dotimes (i arg) | |
(end-of-line)) | |
(set-mark (point)) | |
(goto-char here))) | |
(defun mark-sentence (&optional arg) | |
(interactive "P") | |
(backward-sentence) | |
(mark-end-of-sentence arg)) | |
(define-key global-map [(meta shift ?w)] 'mark-word) | |
(define-key global-map [(meta shift ?l)] 'mark-line) | |
(define-key global-map [(meta shift ?s)] 'mark-sentence) | |
(define-key global-map [(meta shift ?x)] 'mark-sexp) | |
(define-key global-map [(meta shift ?b)] 'python-mark-block) | |
(define-key global-map [(meta shift ?h)] 'mark-paragraph) | |
(define-key global-map [(meta shift ?d)] 'mark-defun) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment