From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: michael.cadilhac@lrde.org (=?iso-8859-1?Q?Micha=EBl?= Cadilhac) Newsgroups: gmane.emacs.devel Subject: Re: [Proposal] M-x tabify to indent only when needed. Date: Tue, 25 Jul 2006 17:28:42 +0200 Organization: Epita/LRDE Message-ID: <87fygpya8l.fsf@lrde.org> References: <8764hm7vwo.fsf@lrde.org> <87irlm68k0.fsf@lrde.org> <87k661ydvu.fsf@lrde.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0624942033==" X-Trace: sea.gmane.org 1153841387 20813 80.91.229.2 (25 Jul 2006 15:29:47 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 25 Jul 2006 15:29:47 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 25 17:29:44 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1G5Oqe-0008NZ-P7 for ged-emacs-devel@m.gmane.org; Tue, 25 Jul 2006 17:29:29 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G5Oqe-00018n-8a for ged-emacs-devel@m.gmane.org; Tue, 25 Jul 2006 11:29:28 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1G5OqL-00016Y-2P for emacs-devel@gnu.org; Tue, 25 Jul 2006 11:29:09 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1G5OqK-00015u-2O for emacs-devel@gnu.org; Tue, 25 Jul 2006 11:29:08 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G5OqK-00015j-03 for emacs-devel@gnu.org; Tue, 25 Jul 2006 11:29:08 -0400 Original-Received: from [62.39.139.2] (helo=kualalumpur.lrde.epita.fr) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1G5OrI-0008F7-PX; Tue, 25 Jul 2006 11:30:09 -0400 Original-Received: from mahaena.lrde.epita.fr ([192.168.101.66] helo=mahaena.lrde) by kualalumpur.lrde.epita.fr with esmtp (Exim 4.50) id 1G5Opw-0003Bf-1p; Tue, 25 Jul 2006 17:28:44 +0200 Original-To: Stefan Monnier Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAElBMVEU/JREXDATg1LV8UCao i1fQpmoP3Nd6AAACa0lEQVQ4jWWUQW7jMAxFqZEPICJzAjXeM6W8dyNqX9ji/a8yn04xnWIEJLD9 LJH85DcJFyJV3erqPty8ExHfBikXSdn0WVezC0hOAQiA2nCsAHOqEnPe4k+puU8zw/t+xquqjRKA 4lHsmQBT8C5pDtBwfwH8VdcHI5+FHtjRxrQRwZsf3hNjZRKAPEzHEdH9mFNSYb5dQK3r8KM6ftNy KikAirDZFWdVkDqbxjGFbAcwbQCxxc8mPRHUGOcCIMgMACV23RfJTch3gC6ofT3qCdG0NyUUPfYF yQrKCIAnuYsgX2qPzW2i9sNrfSOSPPZQiygtCNlCjlpXJV38lIKshF/AZzsAMoArdCKNHfXukPuJ ImbLh+9J2gXwap0QpZ7NjZ7ekdkFcDiqPiLGcHmuvaG/AHgy62s52Lae1ABoA7D6d2kDoAvgbnyD ZutEd6lTHOXfYPHVJDH1K8a1+oyrjoZpAGn1x5pfwPr2E9yjxSpk50/gEyKgD/+BD/KzN3tQ13b8 Cx5loF0AgnZf5IUny9hRHQOYBllHDM+6s3oviZBu77mFjDm621Np3hkjR90wE1BkTYvhdDgDgCmR xWChFfcYAOqMm5NZkVWMur8AL5+oeMQOob2FmY76FiM+PrDDZypwGdqokSlAaQOmGH6mW8KpsOwl 0YOLedjSITr6scNRF8D4PesH33QmLrx8AzjpV/3kkg025w2gfAFYKCLluJAc4Ap+h18oo4S8wzaY klDsBUTiY8EZFkg5Iass75FubC9wd8qa0u9+gRxAsAKEaRAo6iB+vwCMGmdBjvgidQGA1ntMX4CS ZYGV/wADyL80LIX/UAAAAABJRU5ErkJggg== In-Reply-To: (Stefan Monnier's message of "Tue, 25 Jul 2006 11:07:40 -0400") User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:57614 Archived-At: --===============0624942033== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Stefan Monnier writes: >>>> + (if (=3D (/ end-col tab-width) (/ beg-col tab-width)) >>>> + ;; The spacing does not straddle a TAB boundary, so we = won't >>>> + ;; be able to use a TAB here anyway: there's nothing to= do. >>>> + nil >>>=20 >>>> This detects a case where no tabs can be used. >>>> It doesn't detect the case where tabs already ARE used. >>>=20 >>> Those cases aren't matched by the regexp. >>>=20 >>>> -(defvar tabify-regexp "[ \t][ \t]+" >>>> +(defvar tabify-regexp " [ \t]+" >>>=20 >>>> Is that change supposed to exclude those other cases? >>>=20 >>> Exactly. >>>=20 >>> Stefan > >> IIUC, your patch does work and is very much clearer than mine. >> However, it suffers from the same precondition on tabify-regexp, which >> should be described in its docstring. > > Another regexp will also work, except that it may result in "spurious" > buffer modifications. But people have lived with such spurious buffer > modifications until now, so it's not a big deal, is it? Well... Why not tell the user how to get good results? Whatever, the docstring should be modified to tell that \"^\\\\( \\t*\\\\)+\" must be used for =AB tabifying only initial whitespace =BB (IINM). =2D-=20 | Micha=EBl `Micha' Cadilhac | Would someone please DTRT with this= , | | Epita/LRDE Promo 2007 | then ACK? = | | http://www.lrde.org/~cadilh_m | -- Richard Stallman = | `-- - JID: micha@amessage.be --' - -= -' --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) iD8DBQFExjisZYNf4qobZ7kRAoOZAJ0a2XSL/dWxUWOVbYpC7K6FwzmGngCg3Otg nMVgVghnRKj0kYmgbdSQWbI= =WRmD -----END PGP SIGNATURE----- --=-=-=-- --===============0624942033== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel --===============0624942033==--