On Wed, 2014-05-14 at 11:43 -0700, David B. Lamkins wrote:

> 2. (This is unrelated to 1.) When editing a function in a gnu-apl-mode
> buffer, provide a way to revert the definition without closing the edit
> buffer.

The following patch works. If there's an opening del and a left bracket
somewhere on the line, let GNU APL handle the function editing:

diff --git a/gnu-apl-interactive.el b/gnu-apl-interactive.el
index 6d0f8f9..4d5812b 100644
--- a/gnu-apl-interactive.el
+++ b/gnu-apl-interactive.el
@@ -40,7 +40,8 @@ development of the native code.")
   (let* ((trimmed (gnu-apl--trim-spaces string)))
     (cond ((and gnu-apl-auto-function-editor-popup
                 (plusp (length trimmed))
-                (string= (subseq trimmed 0 1) "∇"))
+                (string= (subseq trimmed 0 1) "∇")
+                (not (string-match "\\[" trimmed)))
            ;; The command is a function definition command
            (unless (gnu-apl--parse-function-header (subseq trimmed 1))
              (user-error "Error when parsing function definition
command"))



Reply via email to