branch: externals/idlwave commit e35826c6da09b0b1e0b44d25697f75ec5adca0ca Author: JD Smith <jdtsm...@gmail.com> Commit: JD Smith <jdtsm...@gmail.com>
Accommodate new syntax obj_new('class') == CLASS() IDL 8 introduced a new convenience syntax for calling the Init method of a class. Here we add copied routine info entries which substitute class for the routine name. --- idlwave.el | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/idlwave.el b/idlwave.el index 1a4ffa9595..4b15cd0da5 100644 --- a/idlwave.el +++ b/idlwave.el @@ -7711,6 +7711,7 @@ property indicating the link is added." (idlwave-new-sintern-type 'sysvartag) (add-to-list 'idlwave-complete-special 'idlwave-complete-sysvar-or-tag) (add-hook 'idlwave-update-rinfo-hook 'idlwave-sysvars-reset) +(add-hook 'idlwave-update-rinfo-hook 'idlwave-class-add-init-special) (add-hook 'idlwave-after-load-rinfo-hook 'idlwave-sintern-sysvar-alist) @@ -7835,6 +7836,23 @@ associated TAG, if any." (setq tags (cdr tags)))))))) +(defun idlwave-class-add-init-special () + ;; Create special entries for Class::Init() methods as Class() (IDL >=8) + (idlwave-routines) + (setcdr (last idlwave-routines) + (idlwave-sintern-rinfo-list + (mapcar + (lambda (entry) + (let ((new-entry (copy-sequence entry))) + (setcar new-entry (nth 2 entry)) + (setcar (cddr new-entry) nil) + new-entry)) + (idlwave-all-assq (idlwave-sintern-method "Init") + idlwave-routines)) + 'set))) + + + (defun idlwave-sysvars-reset () (if (and (fboundp 'idlwave-shell-is-running) (idlwave-shell-is-running)