From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: mopi <52hands@gmail.com> Newsgroups: gmane.emacs.help Subject: Re: Use tab key to indent both region AND line? Date: 20 Apr 2007 12:07:55 -0700 Organization: http://groups.google.com Message-ID: <1177096075.943972.240990@o5g2000hsb.googlegroups.com> References: <1177071040.638066.76140@n76g2000hsh.googlegroups.com> <6dbd4d000704200545s1290bfcaw755d4df752ee976f@mail.gmail.com> <1177084896.286288.184040@e65g2000hsc.googlegroups.com> <1177091646.936347.179410@p77g2000hsh.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: sea.gmane.org 1177097757 22158 80.91.229.12 (20 Apr 2007 19:35:57 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 20 Apr 2007 19:35:57 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Apr 20 21:35:50 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HeytZ-0000ga-CQ for geh-help-gnu-emacs@m.gmane.org; Fri, 20 Apr 2007 21:35:49 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Heyye-0006iy-Pr for geh-help-gnu-emacs@m.gmane.org; Fri, 20 Apr 2007 15:41:04 -0400 Original-Path: shelby.stanford.edu!newshub.stanford.edu!postnews.google.com!o5g2000hsb.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 24 Original-NNTP-Posting-Host: 81.230.102.61 Original-X-Trace: posting.google.com 1177096076 2620 127.0.0.1 (20 Apr 2007 19:07:56 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Fri, 20 Apr 2007 19:07:56 +0000 (UTC) In-Reply-To: <1177091646.936347.179410@p77g2000hsh.googlegroups.com> User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; sv-SE; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: o5g2000hsb.googlegroups.com; posting-host=81.230.102.61; posting-account=2hN_GQ0AAACPrJKt-6-vp_n8wTh4w5Ay Original-Xref: shelby.stanford.edu gnu.emacs.help:147318 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: news.gmane.org gmane.emacs.help:42922 Archived-At: Wohoo! I found this little thing in easymacs.el that does exactly what I want. (defun easymacs-rigidly-indent-line-or-region () (interactive) (if mark-active (increase-left-margin (region-beginning) (region-end) nil) (increase-left-margin (point-at-bol) (point-at-eol) nil)) (setq deactivate-mark nil)) (defun easymacs-rigidly-unindent-line-or-region () (interactive) (if mark-active (decrease-left-margin (region-beginning) (region-end) nil) (decrease-left-margin (point-at-bol) (point-at-eol) nil)) (setq deactivate-mark nil)) (global-set-key [tab] 'easymacs-rigidly-indent-line-or-region) (global-set-key [S-tab] 'easymacs-rigidly-unindent-line-or- region)