From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.help Subject: Re: Edit region in different mode Date: Wed, 22 Dec 2004 16:14:52 -0700 Message-ID: <32udffF3s8udsU1@individual.net> References: <87y8fqgv09.fsf@ghidra.localhost> <87d5x2az84.fsf@thalassa.informatimago.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1103757566 14608 80.91.229.6 (22 Dec 2004 23:19:26 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 22 Dec 2004 23:19:26 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Dec 23 00:19:21 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1ChFlI-0004rS-00 for ; Thu, 23 Dec 2004 00:19:21 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1ChFvr-0006bR-D2 for geh-help-gnu-emacs@m.gmane.org; Wed, 22 Dec 2004 18:30:15 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsmi-us.news.garr.it!newsmi-eu.news.garr.it!NewsITBone-GARR!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 25 Original-X-Trace: individual.net GLEKcMuVfmECAq03gyc9+QkjAVa6QM5qiN3kGsQPyZ5yRh3Xg= User-Agent: Mozilla Thunderbird 0.9 (X11/20041105) X-Accept-Language: en-us, en In-Reply-To: <87d5x2az84.fsf@thalassa.informatimago.com> Original-Xref: shelby.stanford.edu gnu.emacs.help:127483 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:22936 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:22936 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 ") > 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