bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#1475: Bind a few more common key combinations in mac-key-mode.el


From: Brett Hoerner
Subject: bug#1475: Bind a few more common key combinations in mac-key-mode.el
Date: Tue, 2 Dec 2008 17:01:57 -0600

In other Mac application it is common to be able to combine Shift with
Command + Direction shortcuts to select text in that direction.

The following is a tiny patch that makes it so you can, for example,
Command+Shift+Left to select to the beginning of the line, or
Common+Shift+Down to select the rest of the buffer.

Brett


--- a/mac-key-mode.el   2008-12-02 16:56:30.000000000 -0600
+++ b/mac-key-mode.el   2008-12-02 16:57:04.000000000 -0600
@@ -117,6 +117,10 @@
     (define-key map [(alt c)] 'clipboard-kill-ring-save)
     (define-key map [(alt v)] 'clipboard-yank)
     (define-key map [(alt a)] 'mark-whole-buffer)
+    (define-key map [(alt shift left)] 'beginning-of-line-mark)
+    (define-key map [(alt shift right)] 'end-of-line-mark)
+    (define-key map [(alt shift up)] 'beginning-of-buffer-mark)
+    (define-key map [(alt shift down)] 'end-of-buffer-mark)
     (define-key map [(alt f)] 'isearch-forward)
     (define-key map [(alt meta f)] 'occur)
     (define-key map [(alt g)] 'isearch-repeat-forward)







reply via email to

[Prev in Thread] Current Thread [Next in Thread]