[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/idlwave 2fc208f70b 276/360: Add support for IDL8's fore
From: |
ELPA Syncer |
Subject: |
[elpa] externals/idlwave 2fc208f70b 276/360: Add support for IDL8's foreach control statement. |
Date: |
Sun, 28 Apr 2024 00:59:33 -0400 (EDT) |
branch: externals/idlwave
commit 2fc208f70bd89d5d5a814fff716f5a73cf29c52b
Author: JD Smith <jdtsmith@gmail.com>
Commit: JD Smith <jdtsmith@gmail.com>
Add support for IDL8's foreach control statement.
---
idlwave.el | 57 +++++++++++++++++++++++++++++++++++----------------------
1 file changed, 35 insertions(+), 22 deletions(-)
diff --git a/idlwave.el b/idlwave.el
index aecacbda71..63545a4cff 100644
--- a/idlwave.el
+++ b/idlwave.el
@@ -1131,26 +1131,27 @@ As a user, you should not set this to t.")
(defvar idlwave-idl-keywords
;; To update this regexp, update the list of keywords and
;; evaluate the form.
- ;; (insert
- ;; (prin1-to-string
- ;; (concat
- ;; "\\<\\("
- ;; (regexp-opt
- ;; '("||" "&&" "and" "or" "xor" "not"
- ;; "eq" "ge" "gt" "le" "lt" "ne"
- ;; "for" "do" "endfor"
- ;; "if" "then" "endif" "else" "endelse"
- ;; "case" "of" "endcase"
- ;; "switch" "break" "continue" "endswitch"
- ;; "begin" "end"
- ;; "repeat" "until" "endrep"
- ;; "while" "endwhile"
- ;; "goto" "return"
- ;; "inherits" "mod"
- ;; "compile_opt" "forward_function"
- ;; "on_error" "on_ioerror")) ; on_error is not officially reserved
- ;; "\\)\\>")))
-
"\\<\\(&&\\|and\\|b\\(egin\\|reak\\)\\|c\\(ase\\|o\\(mpile_opt\\|ntinue\\)\\)\\|do\\|e\\(lse\\|nd\\(case\\|else\\|for\\|if\\|rep\\|switch\\|while\\)?\\|q\\)\\|for\\(ward_function\\)?\\|g\\(oto\\|[et]\\)\\|i\\(f\\|nherits\\)\\|l[et]\\|mod\\|n\\(e\\|ot\\)\\|o\\(n_\\(error\\|ioerror\\)\\|[fr]\\)\\|re\\(peat\\|turn\\)\\|switch\\|then\\|until\\|while\\|xor\\|||\\)\\>")
+ ;; (insert
+ ;; (prin1-to-string
+ ;; (concat
+ ;; "\\<\\("
+ ;; (regexp-opt
+ ;; '("||" "&&" "and" "or" "xor" "not"
+ ;; "eq" "ge" "gt" "le" "lt" "ne"
+ ;; "for" "do" "endfor" "foreach" "endforeach"
+ ;; "if" "then" "endif" "else" "endelse"
+ ;; "case" "of" "endcase"
+ ;; "switch" "break" "continue" "endswitch"
+ ;; "begin" "end"
+ ;; "repeat" "until" "endrep"
+ ;; "while" "endwhile"
+ ;; "goto" "return"
+ ;; "inherits" "mod"
+ ;; "compile_opt" "forward_function"
+ ;; "on_error" "on_ioerror")) ; on_error is not officially
reserved
+ ;; "\\)\\>")))
+
+
"\\<\\(\\(?:&&\\|and\\|b\\(?:egin\\|reak\\)\\|c\\(?:ase\\|o\\(?:mpile_opt\\|ntinue\\)\\)\\|do\\|e\\(?:lse\\|nd\\(?:case\\|else\\|for\\(?:each\\)?\\|if\\|rep\\|switch\\|while\\)?\\|q\\)\\|for\\(?:each\\|ward_function\\)?\\|g\\(?:oto\\|[et]\\)\\|i\\(?:f\\|nherits\\)\\|l[et]\\|mod\\|n\\(?:e\\|ot\\)\\|o\\(?:n_\\(?:\\(?:io\\)?error\\)\\|[fr]\\)\\|re\\(?:peat\\|turn\\)\\|switch\\|then\\|until\\|while\\|xor\\|||\\)\\)\\>")
(let* (;; Procedure declarations. Fontify keyword plus procedure name.
@@ -1294,7 +1295,7 @@ case does not matter. The search skips matches in
comments.")
"Regular expression to match a continued line.")
(defconst idlwave-end-block-reg
- "\\<end\\(\\|case\\|switch\\|else\\|for\\|if\\|rep\\|while\\)\\>"
+ "\\<end\\(\\|case\\|switch\\|else\\|for\\|foreach\\|if\\|rep\\|while\\)\\>"
"Regular expression to find the end of a block.
The case does not matter. The search skips matches found in
comments.")
@@ -1305,6 +1306,7 @@ comments.")
("case" . "endcase")
("else" . "endelse")
("for" . "endfor")
+ ("foreach" . "endforeach")
("then" . "endif")
("repeat" . "endrep")
("switch" . "endswitch")
@@ -1317,7 +1319,7 @@ This is used to check for the correct END type, to close
blocks and
to expand generic end statements to their detailed form.")
(defconst idlwave-block-match-regexp
- "\\<\\(else\\|for\\|then\\|repeat\\|while\\)\\>"
+ "\\<\\(else\\|for\\|foreach\\|then\\|repeat\\|while\\)\\>"
"Regular expression matching reserved words which can stand before
blocks starting with a BEGIN statement. The matches must have associations
`idlwave-block-matches'.")
@@ -1347,6 +1349,7 @@ blocks starting with a BEGIN statement. The matches must
have associations
(cons 'end (list idlwave-end-block-reg nil))
'(if . ("if\\>" "then"))
'(for . ("for\\>" "do"))
+ '(foreach . ("foreach\\>" "do"))
'(begin . ("begin\\>" nil))
'(pdef . ("pro\\>\\|function\\>" nil))
'(while . ("while\\>" "do"))
@@ -1665,6 +1668,7 @@ If NOPREFIX is non-nil, don't prepend prefix character.
Installs into
(idlwave-define-abbrev "c" "" (idlwave-code-abbrev idlwave-case))
(idlwave-define-abbrev "sw" "" (idlwave-code-abbrev idlwave-switch))
(idlwave-define-abbrev "f" "" (idlwave-code-abbrev idlwave-for))
+(idlwave-define-abbrev "fe" "" (idlwave-code-abbrev idlwave-foreach))
(idlwave-define-abbrev "fu" "" (idlwave-code-abbrev idlwave-function))
(idlwave-define-abbrev "pr" "" (idlwave-code-abbrev idlwave-procedure))
(idlwave-define-abbrev "r" "" (idlwave-code-abbrev idlwave-repeat))
@@ -1745,6 +1749,7 @@ If NOPREFIX is non-nil, don't prepend prefix character.
Installs into
(idlwave-define-abbrev "endcase" "endcase" 'idlwave-show-begin-check t)
(idlwave-define-abbrev "endelse" "endelse" 'idlwave-show-begin-check t)
(idlwave-define-abbrev "endfor" "endfor" 'idlwave-show-begin-check t)
+(idlwave-define-abbrev "endforeach" "endforeach" 'idlwave-show-begin-check t)
(idlwave-define-abbrev "endif" "endif" 'idlwave-show-begin-check t)
(idlwave-define-abbrev "endrep" "endrep" 'idlwave-show-begin-check t)
(idlwave-define-abbrev "endswitch" "endswitch" 'idlwave-show-begin-check t)
@@ -3856,6 +3861,14 @@ unless the optional second argument NOINDENT is non-nil."
(idlwave-rw-case " do begin\n\nendfor")
"Loop expression"))
+(defun idlwave-foreach ()
+ "Build skeleton IDL for loop statement."
+ (interactive)
+ (idlwave-template
+ (idlwave-rw-case "foreach")
+ (idlwave-rw-case " do begin\n\nendforeach")
+ "Loop expression"))
+
(defun idlwave-if ()
"Build skeleton IDL if statement."
(interactive)
- [elpa] externals/idlwave f039ae1a30 327/360: Added support for master file compilation., (continued)
- [elpa] externals/idlwave f039ae1a30 327/360: Added support for master file compilation., ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave de394f13b7 030/360: * idlwave.el (idlwave-popup-select): Moved this and auxiliary, ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave 5700fb8ba9 038/360: * idlw-shell.el (idlwave-shell-examine-display): Had to set, ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave f9e05aa3d5 089/360: - Don't bind C- debug keys if Shift is among modifiers., ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave 7aa2f1161f 257/360: New menu for retall, ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave eeced673cd 242/360: Use `mapc'/`dolist' instead of `mapcar', ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave ad32d4389b 248/360: Remove unused local variables., ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave 369eb32d5a 189/360: If no default command, prompt for one, ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave 595045c953 226/360: Remove ".html" unless anchored, for IDL 7.0, ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave 2ff224ccaf 235/360: run-mode-hooks instead of run-hooks, ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave 2fc208f70b 276/360: Add support for IDL8's foreach control statement.,
ELPA Syncer <=
- [elpa] externals/idlwave c27ec44f9d 261/360: Cleanup email addresses., ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave 8f7a8bbfd6 296/360: Remove vestigial IDL assistant reference., ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave 19c9d54b69 328/360: Better handling of htm[l] entries in XML info., ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave 3ee283529b 311/360: Convenience functions for routine entries, ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave 15993e1fdd 270/360: Allow breakpoints in files with spaces, ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave 8836a2135b 293/360: More uses of the name in routine syntax., ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave 0845470474 309/360: Include arrow on stop line always., ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave e9431581ec 319/360: Update README., ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave 252d934b1e 316/360: Update version/routine count., ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave 733a5729ac 305/360: Remove vestigial XEmacs and other unnecessary code, ELPA Syncer, 2024/04/28