all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ronaldo Menezes <rmenezes@cs.fit.edu>
Subject: emacs indentation bug
Date: Tue, 14 Oct 2003 21:04:56 -0400	[thread overview]
Message-ID: <3F8C9D38.9010202@cs.fit.edu> (raw)

[-- Attachment #1: Type: text/plain, Size: 441 bytes --]

A student of mine came to me with the attached Java code complaining 
that emacs could not indent it correctly.
Although the code is correct (it compiles, if the other classes were 
available) the regular expression used
in emacs doesn't seem to like some strings with colons. Just try to 
"indent-region" the attached code
and you'll see what I mean.

Ronaldo Menezes
Assistant Professor, Computer Sciences
Florida Institute of Technology


[-- Attachment #2: Problem_TestDriver.java --]
[-- Type: text/plain, Size: 3625 bytes --]

/*****************************************
 *   Karen Oertner
 *   Lab 06
 *   Implementation of a link list
 *   which has pointers to the 
 *   next node inserted, the next node 
 *   in ascending order, and the 
 *   next node in decending order.
 ******************************************/

public class TestDriver {
    
    public static void main(String[] args) {
        String s = "";
        LinkList ll = new LinkList();
        //add items to the list at the tail
        System.out.println("================================\nAdd items to tail ");
        ll.add("BBBBBB");
        ll.add("AAAAA");
        ll.add("TEST");
        ll.add("Karen");
        ll.add("Greg");
        ll.add("aaaaa");
        
        //print the lists
        System.out.println("\nThe linked list in inserted order: ");
        ll.printLLNext();
        System.out.println("\n\nThe linked list in decending order (case sentitive): ");
        ll.printLLDecend();
        System.out.println("\n\nThe linked list in ascending order (case sentitive): "); 
									ll.printLLAscend();
        
        //test the insert function - add items to the head of the list
        System.out.println("\n\n=============================\nInsert Function at beginning");
        ll.insert("Susan");
        ll.insert("Sara");
        
        //print the lists
        System.out.println("\nThe linked list in inserted order:");
        ll.printLLNext();
        System.out.println("\n\nThe linked list in decending order (case sentitive): ");
        ll.printLLDecend();
        System.out.println("\n\nThe linked list in ascending order (case sentitive): ");
        ll.printLLAscend();
                                                                                                                                        
        //test the delete element function
        System.out.println("\n==============================\nDelete Element function (case sensitive): ");
        System.out.println(ll.delete("AAAAA"));
        System.out.println(ll.delete("Sara"));
        System.out.println(ll.delete("Gregs"));
        
        //print the lists
        System.out.println("\nThe linked list in inserted order: ");
        ll.printLLNext();
        System.out.println("\n\nThe linked list in decending order (case sentitive): ");
        ll.printLLDecend();
        System.out.println("\n\nThe linked list in ascending order (case sentitive): ");
        ll.printLLAscend();
        
        //test the delete all elements function
        System.out.println("\n==============================\nDelete All Elements function: ");
        ll.deleteAll();
        //print the lists
	
        System.out.println("\nThe linked list in inserted order: ");
        ll.printLLNext();
        System.out.println("\n\nThe linked list in decending order (case sentitive): ");
        ll.printLLDecend();
        System.out.println("\n\nThe linked list in ascending order (case sentitive): ");
        ll.printLLAscend();
        
        //prove the delete function by adding new items to the list
        System.out.println("\n\n=============================\nRebuild list");
        ll.insert("Sally");
        ll.insert("David");
        ll.add("Zero");
        ll.add("Alpha");

        //print the lists
        System.out.println("\nThe linked list in inserted order: ");
        ll.printLLNext();
        System.out.println("\n\nThe linked list in decending order (case sentitive): ");
        ll.printLLDecend();
        System.out.println("\n\nThe linked list in ascending order (case sentitive): ");
        ll.printLLAscend();

    }

}

[-- Attachment #3: Type: text/plain, Size: 148 bytes --]

_______________________________________________
Bug-gnu-emacs mailing list
Bug-gnu-emacs@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-gnu-emacs

                 reply	other threads:[~2003-10-15  1:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3F8C9D38.9010202@cs.fit.edu \
    --to=rmenezes@cs.fit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.