[Top][All Lists]

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

Re: [h-e-w] if I set home key to this macro then shift+home does not sel

From: Lennart Borgman
Subject: Re: [h-e-w] if I set home key to this macro then shift+home does not select text in cua-mode
Date: Tue, 25 Nov 2008 00:59:11 +0100

This is not specific to ms windows. Please post it on gnu-emacs instead.

On Tue, Nov 25, 2008 at 12:38 AM, Tolkin, Steve <address@hidden> wrote:
> Summary: If I bind the home key to the macro below and press shift+home
> it does not select the text.
> Details:
> 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."
>  (interactive)
>  (let ((pos (save-excursion (back-to-indentation) (point))))
>    (if (equal pos (point))
>        (beginning-of-line)
>      (back-to-indentation))))
>  (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.
> Thanks,
> Steve
> --
> Steven Tolkin
> There is nothing so practical as a good theory.  Comments are by me,
> not Fidelity Investments, its subsidiaries or affiliates.

reply via email to

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