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

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

Re: Edit region in different mode


From: Pascal Bourguignon
Subject: Re: Edit region in different mode
Date: 23 Dec 2004 02:03:01 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

Kevin Rodgers <ihs_4664@yahoo.com> writes:

> Pascal Bourguignon wrote:
>  > Yes, I have the same problem. Here's what I have in my ~/.emacs:
>  >
>  > (global-set-key [f5]       'set-justification-left)
>  >
>  > (global-set-key [3 f5]    (lambda (start end) (interactive "r")
>  >                               (let ((mode major-mode))
>  >                                 (text-mode)
>  >                                 (set-justification-left start end)
>  >                                 (funcall mode))))
> 
> These alternatives are more readable and portable than [3 f5]:
> 
>       [?\C-c f5]
>       [(control c) f5]
>       (kbd "C-c <f5>")

Thank you. I fought quite a time to find an accepted syntax...


>  > So F5 does the justification of the region in the current mode, which
>  > is wrong in lisp mode.
>  >
>  > C-c F5 does the justification in the text mode and then reverts to the
>  > saved major-mode.
> 
> -- 
> Kevin Rodgers

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
I need a new toy.
Tail of black dog keeps good time.
Pounce! Good dog! Good dog!


reply via email to

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