[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[h-e-w] if I set home key to this macro then shift+home does not select
[h-e-w] if I set home key to this macro then shift+home does not select text in cua-mode
Mon, 24 Nov 2008 18:38:22 -0500
Summary: If I bind the home key to the macro below and press shift+home
it does not select the text.
I am running GNU Emacs 22.3.1 on of 2008-09-96 on SOFT-MJASON. On
windows XP SP2.
This used to work in emacs 22. I suspect the problem has to do with
changes to cua-mode (which I have on) and/or transient mark-mode (which
I explicitly set on in v. 22,but now seems to be part of cua-mode.)
Here is the macro definition:
;; Posted to comp.emacs by:
;; Kai Grossjohann <address@hidden>
(defun my-home ()
"Toggle the point between the beginning of the current line, and the
first non-whitespace character on the line."
(let ((pos (save-excursion (back-to-indentation) (point))))
(if (equal pos (point))
(global-set-key [home] 'my-home)
My current workaround is simply to comment out the global-set-key line.
Is there a fix to the macro to get the old behavior? Even better would
be something already in cua-mode or simple.el etc that i could use.
There is nothing so practical as a good theory. Comments are by me,
not Fidelity Investments, its subsidiaries or affiliates.
- [h-e-w] if I set home key to this macro then shift+home does not select text in cua-mode,
Tolkin, Steve <=