unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* if I set home key to this macro then shift+home does not select text in cua-mode
@ 2008-11-25  0:21 Tolkin, Steve
  0 siblings, 0 replies; 6+ messages in thread
From: Tolkin, Steve @ 2008-11-25  0:21 UTC (permalink / raw)
  To: help-gnu-emacs

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 <Kai.Grossjohann@CS.Uni-Dortmund.DE>
(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. 


Note: I am now also sending this to help-gnus-emacs because it was
suggested on the h-e-w list that this was not specific to Windows.


Thanks, 
Steve
-- 
Steven Tolkin    
There is nothing so practical as a good theory.  Comments are by me, 
not Fidelity Investments, its subsidiaries or affiliates.









^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-11-25 20:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.1213.1227617025.26697.help-gnu-emacs@gnu.org>
2008-11-25 13:57 ` if I set home key to this macro then shift+home does not select text in cua-mode Xah Lee
2008-11-25 16:14   ` Tolkin, Steve
2008-11-25 16:56     ` Tolkin, Steve
     [not found]     ` <mailman.1236.1227635531.26697.help-gnu-emacs@gnu.org>
2008-11-25 20:20       ` Xah Lee
2008-11-25 16:27   ` Lennart Borgman
2008-11-25  0:21 Tolkin, Steve

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).