[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MIT-Scheme-devel] Patch: Tweak output of Edwin's `show-parameter-li
From: |
Richard Loveland |
Subject: |
Re: [MIT-Scheme-devel] Patch: Tweak output of Edwin's `show-parameter-list' command |
Date: |
Mon, 15 Jul 2013 15:44:51 -0400 |
> I've tweaked Edwin's `show-parameter-list' command to display the
> procedure's name in front of the parameter list in the minibuffer as
> follows:
> `bind-condition-handler: (types handler thunk)'
> I find this easier to read because it aligns more closely to how the
> code in the buffer looks, as well as reminding me what procedure I'm
> currently looking at the arguments for.
> The operation of the command when used with a prefix argument is
> unchanged.
Sorry about that, had a minor brain malfunction. What I *meant* to add
to the end of that was: do you guys think something like this is
appropriate for inclusion in Edwin? I know it's pretty minor.
===File ~/Desktop/show-param-list.patch=====================
diff --git a/src/edwin/schmod.scm b/src/edwin/schmod.scm
index 6336943..63ba216 100644
--- a/src/edwin/schmod.scm
+++ b/src/edwin/schmod.scm
@@ -294,11 +294,13 @@ Otherwise, it is shown in the echo area."
(let ((start
(forward-down-list (backward-up-list point 1 'ERROR) 1 'ERROR))
(buffer (mark-buffer point)))
- (let ((end (forward-sexp start 1 'ERROR)))
+ (let* ((end (forward-sexp start 1 'ERROR))
+ (procedure-region (make-region start end))
+ (procedure-name (region->string procedure-region)))
(let ((procedure
(let ((environment (evaluation-environment buffer)))
(extended-scode-eval
- (syntax (with-input-from-region (make-region start end) read)
+ (syntax (with-input-from-region procedure-region read)
environment)
environment))))
(if (procedure? procedure)
@@ -326,7 +328,7 @@ Otherwise, it is shown in the echo area."
(insert-string " . " point)
(insert-string (symbol-name argl) point)))))
(fluid-let ((*unparse-uninterned-symbols-by-name?* #t))
- (message argl))))
+ (message procedure-name ": " argl))))
(editor-error "Expression does not evaluate to a procedure: "
(extract-string start
end))))))))============================================================
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [MIT-Scheme-devel] Patch: Tweak output of Edwin's `show-parameter-list' command,
Richard Loveland <=