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: Kevin Rodgers
Subject: Re: Edit region in different mode
Date: Wed, 22 Dec 2004 16:14:52 -0700
User-agent: Mozilla Thunderbird 0.9 (X11/20041105)

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>")

> 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


reply via email to

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