From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Fwd: Bug in lisp indentation Date: Sun, 15 Jul 2007 21:49:38 -0400 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1184550590 16592 80.91.229.12 (16 Jul 2007 01:49:50 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 16 Jul 2007 01:49:50 +0000 (UTC) Cc: emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 16 03:49:47 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IAFic-0000vu-6T for ged-emacs-devel@m.gmane.org; Mon, 16 Jul 2007 03:49:46 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IAFib-0006HR-K3 for ged-emacs-devel@m.gmane.org; Sun, 15 Jul 2007 21:49:45 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IAFiY-0006Dt-B2 for emacs-devel@gnu.org; Sun, 15 Jul 2007 21:49:42 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IAFiW-0006Bg-Qu for emacs-devel@gnu.org; Sun, 15 Jul 2007 21:49:42 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IAFiW-0006BV-NF for emacs-devel@gnu.org; Sun, 15 Jul 2007 21:49:40 -0400 Original-Received: from tomts16.bellnexxia.net ([209.226.175.4] helo=tomts16-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IAFiV-00020r-ID; Sun, 15 Jul 2007 21:49:39 -0400 Original-Received: from pastel.home ([74.12.207.61]) by tomts16-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20070716014938.WGOY1673.tomts16-srv.bellnexxia.net@pastel.home>; Sun, 15 Jul 2007 21:49:38 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 060777FEF; Sun, 15 Jul 2007 21:49:37 -0400 (EDT) In-Reply-To: (Richard Stallman's message of "Sat\, 14 Jul 2007 14\:00\:13 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) X-detected-kernel: Solaris 8 (1) 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:74872 Archived-At: > neither is the beaviour of indent-region consistent with TAB. This is very easy to fix. And I think it's a good idea in any case. See patch below, Stefan --- lisp-mode.el 08 jui 2007 14:44:28 -0400 1.202 +++ lisp-mode.el 15 jui 2007 21:49:08 -0400 @@ -214,8 +214,6 @@ ;;(set (make-local-variable 'adaptive-fill-mode) nil) (make-local-variable 'indent-line-function) (setq indent-line-function 'lisp-indent-line) - (make-local-variable 'indent-region-function) - (setq indent-region-function 'lisp-indent-region) (make-local-variable 'parse-sexp-ignore-comments) (setq parse-sexp-ignore-comments t) (make-local-variable 'outline-regexp) @@ -1206,16 +1204,6 @@ (setq outer-loop-done (= (point) last-point)) (setq last-point (point))))))) -(defun lisp-indent-region (start end) - "Indent every line whose first char is between START and END inclusive." - (save-excursion - (let ((endmark (copy-marker end))) - (goto-char start) - (and (bolp) (not (eolp)) - (lisp-indent-line)) - (indent-sexp endmark) - (set-marker endmark nil)))) - (defun indent-pp-sexp (&optional arg) "Indent each line of the list starting just after point, or prettyprint it. A prefix argument specifies pretty-printing."