Changeset 14892


Ignore:
Timestamp:
Jul 19, 2011, 4:15:32 PM (8 years ago)
Author:
rme
Message:

Try to improve the "Arglist On Space" command so that the arglist
in the echo area doesn't disappear after the first sub-expression,
but instead re-appears after each sub-expression is closed.

File:
1 edited

Legend:

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

    r14737 r14892  
    23122312    (insert-character point #\Space)
    23132313    (pre-command-parse-check point)
    2314     (with-mark ((mark1 point)
    2315                 (mark2 point))
    2316       (when (backward-up-list mark1)
    2317         (when (form-offset (move-mark mark2 (mark-after mark1)) 1)
    2318           (with-mark ((mark3 mark2))
    2319             (do* ()
    2320                  ((mark= mark3 point)
    2321                   (let* ((fun-name (region-to-string (region mark1 mark2)))
    2322                          (arglist-string
    2323                           (string-to-arglist fun-name (current-buffer) t)))
    2324                     (when arglist-string
    2325                       (message "~a" arglist-string))))
    2326               (if (ccl::whitespacep (next-character mark3))
    2327                 (mark-after mark3)
    2328                 (return nil)))))))))
     2314    (with-mark ((m point))
     2315      (when (backward-up-list m)
     2316        (when (and (scan-char m :lisp-syntax :open-paren)
     2317                   (mark-after m))
     2318          (with-mark ((n m))
     2319          (forward-form n)
     2320            (let* ((fun-name (region-to-string (region m n)))
     2321                   (arglist-string (string-to-arglist fun-name (current-buffer) t)))
     2322              (when arglist-string
     2323                      (message "~a" arglist-string)))))))))
    23292324
    23302325(hi:defcommand "Show Callers" (p)
Note: See TracChangeset for help on using the changeset viewer.