branch: externals/idlwave
commit 74de58976ad26be9a7cedd2c978fb1d09157dc1b
Author: JD Smith <[email protected]>
Commit: JD Smith <[email protected]>
assoc-ignore-case -> assoc-string, loop->cl-loop
---
idlw-complete.el | 2 +-
idlw-help.el | 12 ++++++------
idlw-scan.el | 30 +++++++++++++++---------------
idlw-shell.el | 47 ++++++++++++++++++++++++-----------------------
4 files changed, 46 insertions(+), 45 deletions(-)
diff --git a/idlw-complete.el b/idlw-complete.el
index b1c90e5394..b28d4a51aa 100644
--- a/idlw-complete.el
+++ b/idlw-complete.el
@@ -941,7 +941,7 @@ Restore the pre-completion window configuration if
possible."
((eq mode 'set)
(if entry
(setq link ;; setting dynamic!!!
- (if (setq target (cdr (assoc-ignore-case word tags)))
+ (if (setq target (cdr (assoc-string word tags t)))
(idlwave-substitute-link-target main target)
main))))
(t (error "This should not happen")))))
diff --git a/idlw-help.el b/idlw-help.el
index 4ebf1b713a..5e2f5441c5 100644
--- a/idlw-help.el
+++ b/idlw-help.el
@@ -155,8 +155,8 @@ It collects and prints the diagnostics messages."
(beg (save-excursion (skip-chars-backward chars) (point)))
(end (save-excursion (skip-chars-forward chars) (point)))
(this-word (buffer-substring-no-properties beg end))
- (st-ass (assoc-ignore-case this-word
- idlwave-help-special-topic-words))
+ (st-ass (assoc-string this-word
+ idlwave-help-special-topic-words t))
(classtag (and (string-match "self\\." this-word)
(< beg (- end 4))))
(structtag (and (fboundp 'idlwave-complete-structure-tag)
@@ -208,9 +208,9 @@ It collects and prints the diagnostics messages."
;; An executive command -- only system help
((string-match "^\\.\\([A-Z_]+\\)" this-word)
(let* ((word (match-string 1 this-word))
- (link (cdr (assoc-ignore-case
+ (link (cdr (assoc-string
word
- idlwave-executive-commands-alist))))
+ idlwave-executive-commands-alist t))))
(setq mod1 (list link))))
;; A class -- system OR in-text help (via class__define).
@@ -431,8 +431,8 @@ Those words in `idlwave-completion-help-links' have links.
The
(setq doit (funcall what 'test word))
;; Look for special link property passed in help-links
(if idlwave-completion-help-links
- (setq doit (assoc-ignore-case
- word idlwave-completion-help-links))))
+ (setq doit (assoc-string
+ word idlwave-completion-help-links t))))
(when doit
(if (consp doit)
(setq props (append props `(link ,(cdr doit)))))
diff --git a/idlw-scan.el b/idlw-scan.el
index 91b93e94dd..f3c82b5d45 100644
--- a/idlw-scan.el
+++ b/idlw-scan.el
@@ -3,7 +3,7 @@
;; see idlw-shell.el)
(require 'timer)
-
+(require 'cl-lib)
;; idlwave-routines format (whether system, library, or userlib)
;; ("ROUTINE" type class
;; (system) | (lib pro_file dir "LIBNAME") | (user pro_file dir "USERLIB") |
@@ -670,7 +670,7 @@ Cache to disk for quick recovery."
(while
(string-match "\\[, /?\\({X *| *Y *|
*Z}\\)?\\([A-Z0-9]+\\)[]=]" syntax pos)
(if (match-string 1 syntax)
- (loop for x in '("X" "Y" "Z") do
+ (cl-loop for x in '("X" "Y" "Z") do
(push (concat x (match-string 2 syntax))
graphics-kws))
(push (match-string 2 syntax) graphics-kws))
(setq pos (match-end 0)))
@@ -699,7 +699,7 @@ Cache to disk for quick recovery."
(setq pref-list
(if (match-string 1 kwd) '("X" "Y" "Z") '("X" "Y"))
kwd (substring kwd (match-end 0)))
- (loop for x in pref-list do
+ (cl-loop for x in pref-list do
(push (list (concat x kwd) klink) kwds)))
(push (list kwd klink) kwds)))
@@ -722,7 +722,7 @@ Cache to disk for quick recovery."
(if graphics-kws
(setq kwds (nconc kwds (idlwave-graphics-keywords graphics-kws))))
(setq kwds (idlwave-rinfo-group-keywords kwds link))
- (loop for idx from 0 to 1 do ;add a procedure and function if needed
+ (cl-loop for idx from 0 to 1 do ;add a procedure and function if needed
(if (aref syntax-vec idx)
(push (append (list name (if (eq idx 0) 'pro 'fun)
class '(system)
@@ -755,7 +755,7 @@ Cache to disk for quick recovery."
(setq kwd (substring kwd (match-end 0)))
(setq kwds (mapcar (lambda (x) (concat x kwd)) '("X"
"Y" "Z"))))
(setq kwds (list kwd)))
- (loop for kwd in kwds do
+ (cl-loop for kwd in kwds do
(unless (assoc kwd
idlwave-graphics-keywords-links-alist)
(push (cons kwd (concat gkwfile anchor))
idlwave-graphics-keywords-links-alist)))))))))))
@@ -792,7 +792,7 @@ Cache to disk for quick recovery."
;; Clean up the syntax of routines which are actually aliases by
;; removing the "OR" from the statements
(let (syntax entry)
- (loop for x in aliases do
+ (cl-loop for x in aliases do
(setq entry (assoc x idlwave-system-routines))
(when entry
(while (string-match " +or +" (setq syntax (nth 4 entry)))
@@ -814,7 +814,7 @@ force directory search."
(cond
;; Directly on the alias list
((and
- (setq alias (assoc-ignore-case file alias-list))
+ (setq alias (assoc-string file alias-list t))
(file-exists-p (setq linkfile
(expand-file-name (cdr alias) content-path)))))
@@ -852,7 +852,7 @@ force directory search."
(replace-regexp-in-string
"_+[^_]*\.htm\\(l?\\)" ".htm\\1" file)))
(and (not (string= file lfroot))
- (setq alias (assoc-ignore-case lfroot alias-list))
+ (setq alias (assoc-string lfroot alias-list t))
(file-exists-p
(setq linkfile
(expand-file-name
@@ -932,7 +932,7 @@ force directory search."
;; Executive commands/special topics
(mapc
(lambda (x)
- (let ((alias (assoc-ignore-case (cdr x) alias-list)))
+ (let ((alias (assoc-string (cdr x) alias-list t)))
(if alias
(setcdr x (cdr alias)))))
(append idlwave-help-special-topic-words
@@ -958,7 +958,7 @@ force directory search."
;; Duplicate and trim original routine aliases from rinfo list
;; This if for, e.g. OPENR/OPENW/OPENU
(let (alias remove-list new parts all-parts)
- (loop for x in aliases do
+ (cl-loop for x in aliases do
(when (setq parts (split-string (cdr x) "/"))
(setq new (assoc (cdr x) all-parts))
(unless new
@@ -967,30 +967,30 @@ force directory search."
(setcdr new (delete (car x) (cdr new)))))
;; Add any missing aliases (separate by slashes)
- (loop for x in all-parts do
+ (cl-loop for x in all-parts do
(if (cdr x)
(push (cons (nth 1 x) (car x)) aliases)))
- (loop for x in aliases do
+ (cl-loop for x in aliases do
(when (setq alias (assoc (cdr x) idlwave-system-routines))
(unless (memq alias remove-list) (push alias remove-list))
(setq alias (copy-sequence alias))
(setcar alias (car x))
(push alias idlwave-system-routines)))
- (loop for x in remove-list do
+ (cl-loop for x in remove-list do
(delq x idlwave-system-routines))))
(defun idlwave-convert-xml-clean-sysvar-aliases (aliases)
;; Duplicate and trim original routine aliases from rinfo list
;; This if for, e.g. !X, !Y, !Z.
(let (alias remove-list)
- (loop for x in aliases do
+ (cl-loop for x in aliases do
(when (setq alias (assoc (cdr x) idlwave-system-variables-alist))
(unless (memq alias remove-list) (push alias remove-list))
(setq alias (copy-sequence alias))
(setcar alias (car x))
(push alias idlwave-system-variables-alist)))
- (loop for x in remove-list do
+ (cl-loop for x in remove-list do
(delq x idlwave-system-variables-alist))))
(defun idlwave-xml-create-sysvar-alist (xml-entry)
diff --git a/idlw-shell.el b/idlw-shell.el
index 016bf42488..4b83e1a1d7 100644
--- a/idlw-shell.el
+++ b/idlw-shell.el
@@ -989,24 +989,26 @@ IDL has currently stepped.")
(setq major-mode 'idlwave-shell-mode)
(setq mode-name "IDL-Shell")
(setq idlwave-shell-mode-line-info nil)
- (setq mode-line-format
- '(""
- mode-line-modified
- mode-line-buffer-identification
- " "
- global-mode-string
- " %[("
- mode-name
- mode-line-process
- minor-mode-alist
- "%n"
- ")%]-"
- idlwave-shell-mode-line-info
- "---"
- (line-number-mode "L%l--")
- (column-number-mode "C%c--")
- (-3 . "%p")
- "-%-"))
+ (cl-pushnew 'idlwave-shell-mode-line-info
+ (buffer-local-value mode-line-misc-info))
+ ;; (setq mode-line-format
+ ;; '(""
+ ;; mode-line-modified
+ ;; mode-line-buffer-identification
+ ;; " "
+ ;; global-mode-string
+ ;; " %[("
+ ;; mode-name
+ ;; mode-line-process
+ ;; minor-mode-alist
+ ;; "%n"
+ ;; ")%]-"
+ ;; idlwave-shell-mode-line-info
+ ;; "---"
+ ;; (line-number-mode "L%l--")
+ ;; (column-number-mode "C%c--")
+ ;; (-3 . "%p")
+ ;; "-%-"))
;; (make-local-variable 'idlwave-shell-bp-alist)
(setq idlwave-shell-halt-frame nil
idlwave-shell-trace-frame nil
@@ -2241,8 +2243,8 @@ Change the default directory for the process buffer to
concur."
'hide 'wait)
;; If we don't know anything about the class, update shell routines
(if (and idlwave-shell-get-object-class
- (not (assoc-ignore-case idlwave-shell-get-object-class
- (idlwave-class-alist))))
+ (not (assoc-string idlwave-shell-get-object-class
+ (idlwave-class-alist) t)))
(idlwave-shell-maybe-update-routine-info))
idlwave-shell-get-object-class)))
@@ -3443,7 +3445,6 @@ Resize to no more than BUFFER-HEIGHT-FRAC of the frame
buffer if set."
(defvar idlwave-shell-command-buffer " *idlwave-shell-command*"
"Scratch IDLWAVE mode buffer for parsing IDL statements.")
-
(defun idlwave-shell-bp-query (&optional no-show)
"Reconcile idlwave-shell's breakpoint list with IDL's.
Queries IDL using the string in `idlwave-shell-bp-query'."
@@ -4325,8 +4326,8 @@ Otherwise, just expand the file name."
([(control ?t)] ?t idlwave-shell-toggle-toolbar)
([(control up)] up idlwave-shell-stack-up)
([(control down)] down idlwave-shell-stack-down)
- ([( ?[)] ?[ idlwave-shell-goto-previous-bp t t)
- ([( ?])] ?] idlwave-shell-goto-next-bp t t)
+ ([( ?\[)] ?\[ idlwave-shell-goto-previous-bp t t)
+ ([( ?\])] ?\] idlwave-shell-goto-next-bp t t)
([(control ?f)] ?f idlwave-shell-window)))
(mod (cond ((and idlwave-shell-debug-modifiers
(listp idlwave-shell-debug-modifiers)