branch: externals/cobol-mode
commit 3cc627e9067b8f97bd6da9615d6a933cd1863aaa
Author: Stefan Monnier <[email protected]>
Commit: Stefan Monnier <[email protected]>

    * copyright_exceptions: Update for new uni-confusables/gen-confusables.el
---
 cobol-mode.el | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/cobol-mode.el b/cobol-mode.el
index aed0370..a5c8be6 100644
--- a/cobol-mode.el
+++ b/cobol-mode.el
@@ -2476,17 +2476,22 @@ and ignored areas) between points BEG and END."
   `(,prompt "WHEN " str
     ,@(let ((clauses nil))
         (dotimes (_ num-also)
-          (setf clauses (append clauses `(" ALSO " (skeleton-read ,prompt)))))
+          (push `(" ALSO " (skeleton-read ,prompt)) clauses))
         clauses)
     > \n > _ \n))
 
+(defvar cobol--num-conds)
+
 (define-skeleton cobol-skeleton-evaluate
   "Insert an EVALUATE - END-EVALUATE block."
   "Variable/TRUE: "
-  ;; This is set like so because num-conds is incremented even when no str is 
supplied.
-  '(setf num-conds -1)
-  > "EVALUATE " str ("Variable/TRUE: " '(setf num-conds (1+ num-conds)) " ALSO 
" str) > \n
-  (cobol-when-with-also "Value/Condition: " num-conds)
+  ;; This is set like so because cobol--num-conds is incremented even when no 
str is supplied.
+  '(setf cobol--num-conds -1)
+  > "EVALUATE " str ("Variable/TRUE: "
+                     '(setf cobol--num-conds (1+ cobol--num-conds))
+                     " ALSO " str)
+  > \n
+  (cobol-when-with-also "Value/Condition: " cobol--num-conds)
   "END-EVALUATE")
 
 (define-skeleton cobol-skeleton-program

Reply via email to