Changeset 12878


Ignore:
Timestamp:
Sep 22, 2009, 9:11:13 PM (10 years ago)
Author:
gz
Message:

Bring back Edit Command Definition and make it work.

This fixes bug #168

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/cocoa-ide/hemlock/src/edit-defs.lisp

    r12651 r12878  
    9393        (error (c) (editor-error (format nil "~a" c)))))))
    9494     
    95 
    96 #|
    97 ;;; "Edit Command Definition" is a hack due to creeping evolution in
    98 ;;; GO-TO-DEFINITION.  We specify :function type and a name with "-COMMAND"
    99 ;;; instead of :command type and the real command name because this causes
    100 ;;; the right pattern to be created for searching.  We could either specify
    101 ;;; that you always edit command definitions with this command (breaking
    102 ;;; "Go to Definition" for commands called as functions), fixing the code,
    103 ;;; or we can hack this command so everything works.
    104 ;;;
    10595(defcommand "Edit Command Definition" (p)
    106   "Prompts for command definition name and goes to it for editing."
    10796  "Prompts for command definition name and goes to it for editing."
    10897  (multiple-value-bind
     
    116105        (prompt-for-keyword :tables (list *command-names*)
    117106                            :prompt "Command to edit: "))
    118     (go-to-definition (fun-defined-from-pathname (command-function command))
    119                       :function
    120                       (concatenate 'simple-string name "-COMMAND"))))
    121 
     107    (declare (ignore name))
     108    (handler-case (edit-definition (command-function command))
     109      (error (c) (editor-error (format nil "~a" c))))))
     110
     111#|
    122112;;; FUN-DEFINED-FROM-PATHNAME takes a symbol or function object.  It
    123113;;; returns a pathname for the file the function was defined in.  If it was
Note: See TracChangeset for help on using the changeset viewer.