From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Joe Corneli Newsgroups: gmane.emacs.help Subject: Re: long lines of lisp code Date: Fri, 27 Feb 2004 12:50:23 -0600 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <200402271238.i1RCcN118280@dell3.ma.utexas.edu> NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1077908146 15347 80.91.224.253 (27 Feb 2004 18:55:46 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 27 Feb 2004 18:55:46 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Feb 27 19:55:37 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Awn96-0002Rn-00 for ; Fri, 27 Feb 2004 19:55:36 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1Awn72-0003zb-3z for geh-help-gnu-emacs@m.gmane.org; Fri, 27 Feb 2004 13:53:28 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1Awn56-0003Yy-VB for help-gnu-emacs@gnu.org; Fri, 27 Feb 2004 13:51:28 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1Awn48-0002PK-Lz for help-gnu-emacs@gnu.org; Fri, 27 Feb 2004 13:51:03 -0500 Original-Received: from [146.6.139.124] (helo=dell3.ma.utexas.edu) by monty-python.gnu.org with esmtp (Exim 4.30) id 1Awn47-0002MP-A3 for help-gnu-emacs@gnu.org; Fri, 27 Feb 2004 13:50:27 -0500 Original-Received: from linux183.ma.utexas.edu (mail@linux183.ma.utexas.edu [146.6.139.172]) by dell3.ma.utexas.edu (8.11.0.Beta3/8.10.2) with ESMTP id i1RIoN126535; Fri, 27 Feb 2004 12:50:23 -0600 Original-Received: from jcorneli by linux183.ma.utexas.edu with local (Exim 3.36 #1 (Debian)) id 1Awn43-0006iV-00; Fri, 27 Feb 2004 12:50:23 -0600 Original-To: help-gnu-emacs@gnu.org Original-To: help-gnu-emacs@gnu.org X-all-your-base-are-belong-to-us: You are on the way to destruction. X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:17289 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:17289 Well the reason I was resisting using M-q is that it has to be done intelligently to avoid messing up formatting of comments (it does "preserve comments", so it matches the specifications I sent). Here is an example that clarifies what I'm actually looking for. Here is a long comment (this is GPL code from the KM lisp package): ;;; May 2001 - revise this: (undo ) will undo right back to (if it exists) ;;; Returns NIL if no undo possible, if so. ;;; If checkpoint-id = nil, then just undo to the last checkpoint. ;;; [1] When called from a program, need to do this. When called from KM> prompt, this is done automatically anyway ;;; by (reset-inference-engine) ;;; [2] With *internal-logging*, the done flags ARE on the history trace and so undo0 will undo them. This is better ;;; than undoing absolutely everything. Pressing M-q in the first line results in this: ;;; May 2001 - revise this: (undo ) will undo right ;;; back to (if it exists) Returns NIL if no undo ;;; possible, if so. If checkpoint-id = nil, then ;;; just undo to the last checkpoint. [1] When called from a ;;; program, need to do this. When called from KM> prompt, this is ;;; done automatically anyway by (reset-inference-engine) [2] With ;;; *internal-logging*, the done flags ARE on the history trace and ;;; so undo0 will undo them. This is better than undoing absolutely ;;; everything. This is the sort of formatting I was able to come up with working "by program". On the other hand, if I press M-q in the line following the line that contains the [1], then in the line following the line that contains the [2], then introducing a gap between the line that contains `undo to the last checkpoint' and the line that contains the [1] and pressing M-q somewhere in the first block of code, results in this: ;;; May 2001 - revise this: (undo ) will undo right ;;; back to (if it exists) Returns NIL if no undo ;;; possible, if so. If checkpoint-id = nil, then ;;; just undo to the last checkpoint. ;;; [1] When called from a program, need to do this. When called ;;; from KM> prompt, this is done automatically anyway by ;;; (reset-inference-engine) ;;; [2] With *internal-logging*, the done flags ARE on the history ;;; trace and so undo0 will undo them. This is better than ;;; undoing absolutely everything. This looks so much better than the first attempt above, I wonder if such beautiful formatting could ever be done automatically by a computer *satirical grin*.