Changeset 4344


Ignore:
Timestamp:
10/13/03 12:13:19 (19 years ago)
Author:
piso
Message:

Special case handling for Lisp and LispShell? modes: force lower case completion
if prefix is lower case.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/j/Expansion.java

    r2188 r4344  
    33 *
    44 * Copyright (C) 1998-2003 Peter Graves
    5  * $Id: Expansion.java,v 1.3 2003-06-07 11:03:12 piso Exp $
     5 * $Id: Expansion.java,v 1.4 2003-10-13 12:13:19 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    4242
    4343    private String current;
     44    private boolean forceLowerCase;
    4445
    4546    // For MailAddressExpansion.
     
    7172        Position pos = new Position(dotLine, begin);
    7273        current = pos.getIdentifier(mode);
     74        int modeId = mode.getId();
     75        if (modeId == LISP_MODE || modeId == LISP_SHELL_MODE)
     76            if (Utilities.isLowerCase(prefix))
     77                forceLowerCase = true;
    7378        candidates = list(pos);
    7479    }
     
    148153        if (candidate.equals(current))
    149154            return;
    150         for (int i = list.size()-1; i >= 0; i--) {
     155        if (forceLowerCase)
     156            candidate = candidate.toLowerCase();
     157        for (int i = list.size(); i-- > 0;) {
    151158            if (candidate.equals(list.get(i))) {
    152159                // It's already in the list.
Note: See TracChangeset for help on using the changeset viewer.