Changeset 7540


Ignore:
Timestamp:
Oct 29, 2007, 12:08:02 AM (12 years ago)
Author:
gz
Message:

Implement symbol completion, and bind it to meta-/ (as in Emacs and Lispworks) and meta-` (as in MCL).

(defcommand "Expand Dynamic Abbreviation" (p)

"Treats the symbol before point as an abbreviation and expands it.

It checks the following in order until a suitable expansion is found:

  • last accepted expansion for this abbreviation, if any
  • symbols in current buffer before point
  • symbols in current buffer after point
  • symbols in all other editor windows, front to back
  • symbols visible in the current package, fbound/bound symbols first
  • symbols in all other packages (in no particular order)

If called repeatedly from the same position, replaces the previous expansion
with the next possible one.

A symbol is a suitable expansion for an abbreviation if the abbreviation is
a proper prefix of the symbol, or the abbreviation consists of the initials
of the individual words within the symbol (e.g. mvb => multiple-value-bind).
"

(declare (ignore p))

Location:
trunk/ccl/cocoa-ide
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/cocoa-ide/compile-hemlock.lisp

    r6885 r7540  
    9090    "register"
    9191    "completion"
     92    "symbol-completion"
    9293    "bindings"
    9394    "bindings-gb"                       ;Gilbert's bindings
  • trunk/ccl/cocoa-ide/hemlock/src/bindings.lisp

    r7502 r7540  
    186186;(bind-key "Count Lines Page" #k"control-x l")
    187187
     188(bind-key "Expand Dynamic Abbreviation" #k"meta-/") ;; Aquamacs and LW binding
     189(bind-key "Expand Dynamic Abbreviation" #k"meta-`") ;; MCL binding
    188190
    189191
     
    291293;;; Rebind some standard commands to behave better.
    292294;;;
    293 (bind-key "Kill Parse" #k"control-u" :mode "Echo Area")
     295;;(bind-key "Kill Parse" #k"control-u" :mode "Echo Area")
    294296(bind-key "Insert Parse Default" #k"control-i" :mode "Echo Area")
    295297(bind-key "Insert Parse Default" #k"tab" :mode "Echo Area")
  • trunk/ccl/cocoa-ide/hemlock/src/completion.lisp

    r6 r7540  
    6565;;;
    6666(defvar default-lisp-wordchars
    67   '(#\~ #\! #\@ #\$ #\% #\^ #\& #\+ #\= #\: #\< #\> #\. #\/ #\?))
     67  '(#\~ #\! #\@ #\$ #\% #\^ #\& #\+ #\= #\< #\> #\. #\/ #\?))
    6868
    6969(dolist (char default-lisp-wordchars)
Note: See TracChangeset for help on using the changeset viewer.